Amb: Difference between revisions

Content added Content deleted
(Added 11l)
Line 49: Line 49:
=={{Header|11l}}==
=={{Header|11l}}==
{{trans|Nim}}
{{trans|Nim}}
<lang 11l>F amb(comp, options, prev = ‘’)
<lang 11l>F amb(comp, options, prev = ‘’) -> Array[String]
I options.empty
I options.empty
R Array[String]()
R []


L(opt) options[0]
L(opt) options[0]
Line 69: Line 69:
R opt [+] res // We have a match
R opt [+] res // We have a match


R Array[String]()
R []


A sets = [[‘the’, ‘that’, ‘a’],
A sets = [[‘the’, ‘that’, ‘a’],