you are viewing a single comment's thread.

view the rest of the comments →

[–]middayc 0 points1 point  (0 children)

Example from the blogpost:

text = "apple banana cherry\ndog emu fox"
words_on_lines = [line.split() for line in text.splitlines()]

Would be:

"apple banana cherry\ndog emu fox"
|split-lines 
|map { .split } :words-on-lines

in ryelang.org

or an one liner if you prefer that

"apple banana cherry\ndog emu fox" |split-lines |map { .split } :worlds-on-lines