Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Amb/Langur/amb.langur
Normal file
15
Task/Amb/Langur/amb.langur
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
val .wordsets = [
|
||||
w/the that a/,
|
||||
w/frog elephant thing/,
|
||||
w/walked treaded grows/,
|
||||
w/slowly quickly/,
|
||||
]
|
||||
|
||||
val .alljoin = f(.words) for[=true] .i of len(.words)-1 {
|
||||
if last(.words[.i]) != first(.words[.i+1]): break = false
|
||||
}
|
||||
|
||||
# .amb expects 2 or more arguments
|
||||
val .amb = f(...[2 .. -1] .words) if(.alljoin(.words): join " ", .words)
|
||||
|
||||
writeln join "\n", filter(mapX(.amb, .wordsets...))
|
||||
Loading…
Add table
Add a link
Reference in a new issue