Mercurial > repo
diff src/ploki/examples/fibcheck.pk @ 4223:ac0403686959
<oerjan> rm -rf src/ploki; mv ploki src
author | HackBot |
---|---|
date | Fri, 20 Dec 2013 22:18:50 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/ploki/examples/fibcheck.pk Fri Dec 20 22:18:50 2013 +0000 @@ -0,0 +1,14 @@ +#!../ploki +REM fibonacci sequence tester +REM sample input: +REM x x xx xxx xxxxx +REM x x x +FOR line LET line @LEGS \EING + IF line ; "" + IF line ~ "^s!*({[S!|[{S!}|[2!|1![1]?]{0!}[2]?][0]?]}s!+)+$" + "fibonacci sequence! + ELSE + "nope... + FI + NEXT line + FI