Skip to content

inits

Module Export

[value] |> [[value]]

Returns an iterator of all initial segments of the input.

Examples

import 'iterators'
from [1, 2, 3] inits

Result:

[[], [1], [1,2], [1,2,3]]