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. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them. Check out our Patreon to see our donations.