Amb: Difference between revisions

6 bytes added ,  1 month ago
Line 2,451:
 
<syntaxhighlight lang="langur">val .wordsets = [
wfw/the that a/,
wfw/frog elephant thing/,
wfw/walked treaded grows/,
wfw/slowly quickly/,
]
 
val .alljoin = ffn(.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 = ffn(...[2 .. -1] .words) if(.alljoin(.words): join " ", .words)
 
writeln join "\n", filter( mapX( .amb, .wordsets...))</syntaxhighlight>
 
</syntaxhighlight>
 
{{out}}
885

edits