Add a "pin" operator #9

Open
opened 2023-12-14 01:39:17 +00:00 by kredati · 1 comment
kredati commented 2023-12-14 01:39:17 +00:00 (Migrated from github.com)

à la Elixir: use a bound name in a pattern as a value, e.g.

let x = 42
let *x = 42 &=> ok
let *x = 23 &=> panic!, no match

*x is evaluated in the patterns above.

(Elixir uses ^ instead of *, but * is cooler.

à la Elixir: use a bound name in a pattern as a value, e.g. ``` let x = 42 let *x = 42 &=> ok let *x = 23 &=> panic!, no match ``` `*x` is evaluated in the patterns above. (Elixir uses `^` instead of `*`, but `*` is cooler.
scott self-assigned this 2023-12-15 21:25:22 +00:00
scott removed their assignment 2023-12-27 04:18:16 +00:00
scott added this to the Someday milestone 2024-05-19 19:50:34 +00:00

This could definitely be interesting with string patterns.

This could definitely be interesting with string patterns.
scott modified the milestone from Someday to 0.3.0 2024-07-21 17:41:37 +00:00
scott added this to the Completing the language project 2024-07-21 17:45:44 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
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: twc/ludus#9
No description provided.