Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
15
Task/Amb/Ela/amb-1.ela
Normal file
15
Task/Amb/Ela/amb-1.ela
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
open list core
|
||||
|
||||
amb xs = x where
|
||||
(Some x) = & join xs ""
|
||||
join (x::xs) = amb' x (join xs)
|
||||
join [] = \_ -> Some ""
|
||||
eq' [] x = true
|
||||
eq' w x = last w == head x
|
||||
amb' [] _ _ = None
|
||||
amb' (x::xs) n w
|
||||
| eq' w x =
|
||||
match n x with
|
||||
Some v = Some (x ++ " " ++ v)
|
||||
_ = amb' xs n w
|
||||
| else = amb' xs n w
|
||||
6
Task/Amb/Ela/amb-2.ela
Normal file
6
Task/Amb/Ela/amb-2.ela
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
amb [
|
||||
["the","that","a"]
|
||||
,["frog","elephant","thing"]
|
||||
,["walked","treaded","grows"]
|
||||
,["slowly","quickly"]
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue