ReadonlyaltPicks the first successful computation.
ReadonlyapplyApplies the function to the value over S.
ReadonlyemptyCreates an empty erroneous computation that exits early.
ReadonlymapMaps the function fn onto F structure.
Readonlypure
A functor with monoid-ish combine operation.
All instances of the alternative functor
amust satisfy the following laws:f,gandh;a.alt(a.alt(f)(g))(h)equals toa.alt(f)(a.alt(g)(h)),f,gandx;a.apply(a.alt(f)(g))(x)equals toa.alt(a.apply(f)(x))(a.apply(g)(x)),f;a.alt(a.empty())(f)equals tof,f;a.alt(f)(a.empty())equals tof,f;a.apply(a.empty())(f)equals toa.empty().