Update all new Tasks

This commit is contained in:
Ingy döt Net 2015-02-20 09:02:09 -05:00
parent 00a190b0a6
commit 91df62d461
5697 changed files with 93386 additions and 804 deletions

18
Task/Amb/PicoLisp/amb.l Normal file
View file

@ -0,0 +1,18 @@
(be amb (@E @Lst)
(lst @E @Lst) )
(be joins (@Left @Right)
(^ @T (last (chop (-> @Left))))
(^ @R (car (chop (-> @Right))))
(or
((equal @T @R))
((amb @ NIL)) ) ) # Explicitly using amb fail as required
(be ambExample ((@Word1 @Word2 @Word3 @Word4))
(amb @Word1 ("the" "that" "a"))
(amb @Word2 ("frog" "elephant" "thing"))
(amb @Word3 ("walked" "treaded" "grows"))
(amb @Word4 ("slowly" "quickly"))
(joins @Word1 @Word2)
(joins @Word2 @Word3)
(joins @Word3 @Word4) )