import { chain } from "https://deno.land/x/ramda@v0.27.2/mod.ts";
chain
maps a function over a list and concatenates the results. chain
is also known as flatMap
in some libraries.
Dispatches to the chain
method of the second argument, if present,
according to the FantasyLand Chain spec.
If second argument is a function, chain(f, g)(x)
is equivalent to f(g(x), x)
.
Acts as a transducer if a transformer is given in list position.