Boolean Symbol Pair - modelint/types GitHub Wiki

The values assignable to a Boolean are True and False and we define a toggle operator that swaps the current value with its opposite.

This is also convenient for symbols like on off, up down, and so forth.

So we can build a User Type on top of Boolean that takes advantage of this operator while imbuing true/false with meaing.

For example:

Direction

  Boolean("up", "down")

The Direction type has two values that can be toggled.

Identifiers

  1. Component + User type

Attributes

False symbol

A symbolic single word, all lower case name.

Type: Symbol Name -> Name LcA25

True symbol

A symbolic single word, all lower case name.

Type: Symbol Name -> Name LcA25