LambdaCore icon indicating copy to clipboard operation
LambdaCore copied to clipboard

Types (Structs)

Open Pebaz opened this issue 6 years ago • 0 comments

Need to be able to support user defined types.

:: Type definition
(type 'person '[name age])

:: Instantiation
(set 'pebaz (new person "Pebaz" 24))

:: Usage
(print (get pebaz 'name))
(print (get pebaz "name"))

:: Future
(print pebaz/name)

Once the #29 Dict type is created, it will be easy to make type definitions return Dicts.

Pebaz avatar May 02 '19 20:05 Pebaz