leostera / caramel

:candy: a functional language for building type-safe, scalable, and maintainable applications
https://caramel.run
Apache License 2.0
1.05k stars 25 forks source link

Map Literal syntax #96

Closed AeroNotix closed 3 years ago

AeroNotix commented 3 years ago

Hi,

Does Caramel support the map literal syntax? I can't find examples or documentation which point to it being available.

michallepicki commented 3 years ago

Hi! OCaml records translate to Erlang maps with atom keys: https://caramel.run/manual/guides/syntax-cheatsheet.html#records

{ fst = 1 ; snd = "hej" }
AeroNotix commented 3 years ago

Ah, apologies. I'd read that part of the docs but must've assumed that they were mapping to Erlang records. Not maps!