I have an idea for manipulation of lists. Criticism is appreciated

I would add one symbol '@' that "unravels" a list into it's contents in order to manipulate it as if it was a single instance

numbers = [1, 2, 3]
@doubled = @numbers * 2
doubled = [2, 4, 6]

So this allows mapping. Filtering can also be done similarly by taking advantage of the logical aspect

numbers = [-1, 0, 1, 2, 3]
@result = :[
r = n * 2
n > 0
]~[n = @numbers].r
result = [2, 4, 6]

Follow

You can read about the language and current syntax here

git.kyleperik.com/kyle/judo/

Sign in to participate in the conversation
Merveilles

Revel in the marvels of the universe.