-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I think it would be nice to have a clear syntactic distinction between dict and set expressions. This is my proposal, based on Elixir:
let isDict(%{..}) := true
let isDict(_) := false
assert(%{}.isDict())
This distinction would allow to generate struct-like dicts more comfortably:
let newStruct(val) :=
let foo := x -> val + x
let bar := x -> val * x
%{ foo, bar } # would be the same as %{ "foo" => foo, "bar" => bar }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels