RosettaCodeData/Task/Amb/Julia/amb-2.julia
2023-07-01 13:44:08 -04:00

2 lines
257 B
Text

iter = Iterators.product(["the", "that", "a"], ["frog", "elephant", "thing"], ["walked", "treaded", "grows"], ["slowly", "quickly"])
@show [join(c, " ") for c in iter if all(i -> c[i][end] == c[i + 1][begin], 1:length(c)-1)] # ["that thing grows slowly"]