Skip to main content
Module

x/ramda/mod.ts>unfold

:ram: Practical functional Javascript
Latest
variable unfold
import { unfold } from "https://deno.land/x/ramda@v0.27.2/mod.ts";

Builds a list from a seed value. Accepts an iterator function, which returns either false to stop iteration or an array of length 2 containing the value to add to the resulting list and the seed to be used in the next call to the iterator function.

The iterator function receives one argument: (seed).