Miscellaneous
Short function definitions
Very short functions can be written on one line using =.
Command-line arguments
The signature of main is always void with no arguments.
To take command line arguments, call command-line-args.
To set a process exit code, call exit-process.
Type aliases
Doc comments
Regular comments begin with #. Doc comments begin with |.
When referring to another declaration, or a function parameter, wrap its name in {}.
Keen will check that it really refers to something.
Region comments
region marks the start of a section of a module.
The text to the right of the region keyword is a comment.
This may provide a folding range in your editor. (So far only in VSCode.)
This has no effect on the meaning of the code;
for example, private declarations are still visible in the whole file.
Unused internals
If you run keen check foo (where foo is a directory) and foo/config.kid exists,
it is assumed that this is a complete library.
In that case, Keen will log a diagnostic for any unused internal declarations.
Floats
In Keen, float functions (except for unsafe ones) that would return nan instead throw an exception.
In Keen, a value must always equal itself, so nan == nan.
Also, two values must only be equal if they are indistinguishable,
so -0 != 0.
For comparison, Keen uses this ordering:
To get the looser IEEE float comparison, use float-equal
and float-less.