Module

Record.Studio.Sequence

Package
purescript-record-studio
Repository
rowtype-yoga/purescript-record-studio

#SequenceRecord Source

data SequenceRecord :: (Type -> Type) -> Typedata SequenceRecord (f :: Type -> Type)

Constructors

Instances

#sequenceRecord Source

sequenceRecord :: forall f rin rout. Applicative f => HFoldlWithIndex (SequenceRecord f) (f (Builder (Record ()) (Record ()))) (Record rin) (f (Builder (Record ()) (Record rout))) => Record rin -> f (Record rout)

Recursively sequence a record. E.g.

sequenceRecord { a : { b : { c : { d: Just 10, e : Just "hello" }, f : Just true }
-- Just { a : { b : { c : { d: 10, e : "hello" }, f : true }