Brackets - Spicery/Nutmeg GitHub Wiki

Positionally Indexed

Brackets Constructor Data-type
[% x, y %] LinkedList linked list (long form)
[! x, y !] Tuple tuple (long form only)
[: x, y :] Stream stream (long form)
[ x, y ] List aka Vector vector (short)

Mnemonics

  • ! = exclamation is made from stroke+dot, which are different kinds of mark, like the different types in a tuple.
  • % = two things linked by a slash, for a linked list
  • : = one-dot-after-another, like a stream

Key-Indexed

Brackets Constructor Data-type
{ a => x, b => y } Map map (short form)
{! a=x, b=y !} Record aka NamedTuple record (long form)
{? x, y ?} Set set (long form)

Mnemonics

  • ? = are you in or out of the set?
  • ! = different kind of things (dot vs line)
  • : = similar things
  • % = links in a chain