February 2019
Beginner to intermediate
180 pages
4h 4m
English
The shuffle function randomly shuffles a list. It has type:
Belt.List.t('a) => Belt.List.t('a)
It accepts a list and returns a new list. Let's use it to shuffle our list of integers:
let list = Belt.List.(makeBy(10, i => i)->shuffle);
Read now
Unlock full access