| ▲ | icen 4 hours ago | |||||||
Do you remember what it was? This is how I would spell that in BQN, and you could write something very similar in APL (you don't have shift, so you'd have to write 1 drop 0 cat swap instead)
This works by building a boolean mask of spaces, and converting it to a mask of 'is a space, preceded by a space', negates that, and replicates out by that inverted mask (i.e. is not a space preceded by a space):Here's stepping through it with some input. | ||||||||
| ▲ | dzaima 2 hours ago | parent | next [-] | |||||||
Some alternative spellings: | ||||||||
| ||||||||
| ▲ | tosh 2 hours ago | parent | prev [-] | |||||||
in k: | ||||||||