March 2019
Intermediate to advanced
208 pages
5h 11m
English
The Belt.List module defines a large number of functions for processing lists. (Just a note: the Belt.List definitions and examples[22] are written in OCaml format.) We’ll use the following list for many of the examples:
| | let items = [10, 11, 12, 13, 14, 15, 16]; |
For example, the length function returns the number of elements in the list, so length(items) returns 7. You can use size as a synonym for length.
This section is going to be somewhat of a laundry list of utility functions because it’s difficult to find a specific example that uses all of them. (It’s not an exhaustive list. See the documentation for that.) To make it easier to read, I’ll avoid prefacing each function ...
Read now
Unlock full access