Readonly
foldRFolds the data structure with folder
function by right associativity.
The function which takes the next and accumulating value and returns the calculated accumulation.
The accumulated result value.
Readonly
mapReadonly
traverseMaps each item of the structure data
to an action, and evaluates them from left to right, then collects the result.
The instance of Applicative
for F
.
The collected result of actions.
Generated using TypeDoc
A structure which can be traversed to the structure of same shape by performing
Applicative
action.All instances of the traversable functor
tra
must satisfy the following laws:t
,f
andx
;t(tra.traverse(app1)(f)(x))
equals totra.traverse(app2)((item) => t(f(item)))(x)
, whereapp1
andapp2
are appropriate applicative functors aboutf
andt
respectively,tra.traverse(Identity.applicative)((a) => a)(x)
equals tox
,f
,g
,x
and composed applicative functorapp
forCompose<F, G, _>
;tra.traverse(app)((item) => app.map(g)(f(item)))(x)
equals toapp.map(tra.traverse(app)(g))(tra.traverse(app)(f)(x))
.