include link to prelude
This commit is contained in:
parent
600166884e
commit
3bcfa520ac
|
@ -5,6 +5,8 @@ e.g., running `doc! (add)` will send the documentation for `add` to the console.
|
|||
|
||||
For more information on the syntax & semantics of the Ludus language, see [language.md](./language.md).
|
||||
|
||||
The prelude itself is just a Ludus file, which you can see at [prelude.ld](./prelude.ld).
|
||||
|
||||
## A few notes
|
||||
**Naming conventions.** Functions whose name ends with a question mark, e.g., `eq?`, return booleans.
|
||||
Functions whose name ends with an exclamation point, e.g., `make!`, change state in some way.
|
||||
|
@ -19,8 +21,7 @@ This should be enough to indicate order of arguments, types, and so on.
|
|||
**Patterns often, but do not always, indicate types.** Typed patterns are written as `foo as :bar`,
|
||||
where the type is indicated by the keyword.
|
||||
Possible ludus types are: `:nil`, `:boolean`, `:number`, `:keyword` (atomic values);
|
||||
`:string` (strings are their own beast); `:tuple` and `:list` (indexed collections); `:set` (sets are specific),
|
||||
`:dict` and `:ns` (associative collections); and `:ref` (references).
|
||||
`:string` (strings are their own beast); `:tuple` and `:list` (ordered collections), `:set`s, and `:dict`ionaries (the other collection types); `:pkg` (packages, which are quasi-collections); `:fn` (functions); and `:box`es.
|
||||
|
||||
**Conventional types.** Ludus has two types based on conventions.
|
||||
* _Result tuples._ Results are a way of modeling the result of a calculation that might fail.
|
||||
|
|
Loading…
Reference in New Issue
Block a user