<aaa bbb ccc> ==> 'aaa, bbb and ccc'

Run Settings
LanguageRaku
Language Version
Run Command
# See https://stackoverflow.com/questions/67305345/ # how-to-concatenate-list-objects-into-a-string-and-separate-the-last-2-objects-wi # `given` establishes the "topic" aka "it" # `<foo bar>` is a list of two strings, 'foo' and 'bar' # `put` prints a string and appends a newline # `.[...]` is an index/slice of "it" treated as a list/array. # With no LHS `^` means "zero up to...". (Mnemonic `^` points "up to".) # `*` inside a list/array index is the list/array's length. # `~` is infix string concat op. (Mnemonic: looks like a piece of string.) given <aaa bbb ccc> { put .[^(*-1)] .join(', ') ~ ' and ' ~ .[*-1] }
Editor Settings
Theme
Key bindings
Full width
Lines