diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-06 17:37:43 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-12-06 17:37:43 +0200 |
| commit | e529e0e48c999fccb216bd3f3bc948abe22dbe76 (patch) | |
| tree | 18449b06ef564a2ec6a03dd53a4209b61bbd16e0 /examples/records-concept.milch | |
| parent | e73ad00f44479e3065ccf12d07ca3ae22ca1f3f0 (diff) | |
Clean up examples, stdlib
Diffstat (limited to 'examples/records-concept.milch')
| -rw-r--r-- | examples/records-concept.milch | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/examples/records-concept.milch b/examples/records-concept.milch index 1686d75..dcb4a49 100644 --- a/examples/records-concept.milch +++ b/examples/records-concept.milch @@ -22,30 +22,6 @@ (Ns/User/set-phone-number unit user) ; => (Ns/User name:"Rick" phone-number:<unit>) - - - -; Unions are unions of records with an identifier. `union!` is a builtin function -; that generates functions for manipulating the records in the union. - -; `union!` can only be called in the top-level context. - -(union! Ns/Maybe - (just value) - (nothing)) - -; Generates the following functions: - -(let m1 (Ns/Maybe/just 10)) ; m1 ~> (Ns/Maybe/Just value:10) -(let m2 (Ns/Maybe/nothing)) ; m2 ~> (Ns/Maybe/Nothing) - -(Ns/Maybe/Just/get-value m1) ; => 10 - - - - ; The builtin function `kind` returns the identifier as a string for any record value -(kind m1) ; => "Ns/Maybe/Just" -(kind m2) ; => "Ns/Maybe/Nothing" (kind user) ; => "Ns/User" |
