set/map cons syntax #42

Open
opened 2026-07-07 13:37:53 +02:00 by st · 0 comments
Owner

We could allow notation like { 1, 2 | numbers} to add 1 and 2 to a set. The challenge is: There are multiple set impmlementations so it would need to be overloaded based on a "set-like" interface.

This could also be extended to maps, possibly with a Julia-esque mapsto binary operator, as

{ "abc" -> 5, "def" -> 7 | some_map }

unclear if this is a great idea, might be a bit too magical

We could allow notation like `{ 1, 2 | numbers}` to add `1` and `2` to a set. The challenge is: There are multiple set impmlementations so it would need to be overloaded based on a "set-like" interface. This could also be extended to maps, possibly with a Julia-esque mapsto binary operator, as ``` { "abc" -> 5, "def" -> 7 | some_map } ``` unclear if this is a great idea, might be a bit too magical
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
st/amelie#42
No description provided.