Family Day update
This commit is contained in:
parent
aac6731f2c
commit
9ad63ea473
2442 changed files with 39761 additions and 8255 deletions
|
|
@ -68,7 +68,8 @@ public program()
|
|||
try
|
||||
{
|
||||
ambOperator
|
||||
.for(new {"the","that","a"},new {"frog", "elephant", "thing"},new {"walked", "treaded", "grows"}, new {"slowly", "quickly"})
|
||||
.for(new::("the","that","a"),new::("frog", "elephant", "thing"),new::("walked", "treaded", "grows"),
|
||||
new::("slowly", "quickly"))
|
||||
.seek:(a,b,c,d => joinable(a,b) && joinable(b,c) && joinable(c,d) )
|
||||
.do:(a,b,c,d) { console.printLine(a," ",b," ",c," ",d) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ example = do
|
|||
w2 <- amb ["frog", "elephant", "thing"]
|
||||
w3 <- amb ["walked", "treaded", "grows"]
|
||||
w4 <- amb ["slowly", "quickly"]
|
||||
unless (joins w1 w2) (amb [])
|
||||
unless (joins w2 w3) (amb [])
|
||||
unless (joins w3 w4) (amb [])
|
||||
return (unwords [w1, w2, w3, w4])
|
||||
guard (w1 `joins` w2)
|
||||
guard (w2 `joins` w3)
|
||||
guard (w3 `joins` w4)
|
||||
pure $ unwords [w1, w2, w3, w4]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue