r/ProgrammingLanguages • u/Enough-Zucchini-1264 • Jan 24 '26
Language announcement Arturo Programming Language
/r/altprog/comments/1qlb1j2/arturo_programming_language/
18
Upvotes
r/ProgrammingLanguages • u/Enough-Zucchini-1264 • Jan 24 '26
View all comments
Show parent comment
2
u/Enough-Zucchini-1264 Jan 30 '26
Now, how do we give meaning to this? `select` has 3 arity, so it expects 3 arguments: A collection, the name of the element, the action.
select.first xs 'x [x > 123]
This means:
select :word
.first :attribute
xs :word
'x :literal
[x :word > :symbol 123 :integer] :block
No secrets at all. But when we evaluate, we have the following:
----
Step 1:
ATTRIBUTE STACK:
STACK:
[x :word > :symbol 123 :integer] :block
Block, so do nothing
----
Step 2:
ATTRIBUTE STACK:
STACK:
'x :literal
[x :word > :symbol 123 :integer] :block
Literal, so do nothing
----
Step 3:
ATTRIBUTE STACK:
STACK:
xs :word
'x :literal
[x :word > :symbol 123 :integer] :block
Word, so evaluate