Standard library
The prelude is always in scope. Everything else is an import.
The prelude
Always in scope: Int, Float,
String, Array(a), Binary, Bool,
Nil, Option(a), Result(a, e), Order,
and println.
Modules
| Module | Function |
|---|---|
array |
map, filter, fold, find, and the rest of the combinator suite |
map |
persistent hash maps: set, get, delete, merge, fold |
string |
Unicode-scalar text: split, contains, trim, length |
binary |
raw bytes: slices, parsing, <<'…'>> literals and patterns |
json, json/decode, json/field |
SIMD parsing to a cursor, typed decoders with error paths, the 3 presence states |
int, float, bool |
operations on the primitive types |
decimal |
exact scaled-decimal arithmetic, six explicit rounding modes |
option, result |
combinators: map, then, replace_err |
io |
file reads and writes, returning typed IoError values |
net, net/socket |
TCP listen, accept, connect, serve; bounded reads; vectored writes |
net/tls |
client TLS: a TlsSocket distinct from Socket, verification always on |
http |
the HTTP/1.1 server: serve, Request, Response, one process per connection |
process |
spawn, Pid, sleep, subjects; links, monitors, kill |
os |
the OS process: argv(), env() |
os/port |
child processes over stdio: spawn, read, write, close with the exit status |
time |
monotonic instants and millisecond arithmetic |