Search results

traverse :: forall f t a. Coercible (f a) (f t) => Newtype t a => (a -> t) -> (a -> f a) -> t -> f t

Similar to the function from the Traversable class, but operating within a newtype instead.

P purescript-newtype M Data.Newtype
traverse :: forall t a b m. Traversable t => Applicative m => (a -> m b) -> t a -> m (t b)
P purescript-foldable-traversable M Data.Traversable
traverse :: forall r rl rlo ri ro r1 r2 r3 a b m. RowToList r rl => VariantFTraverseCases m rl ri ro a b => RowToList ro rlo => VariantTags rlo => VariantFMaps rlo => Union ri r2 r1 => Union ro r2 r3 => Applicative m => Traversable (VariantF r2) => Record r -> (a -> m b) -> VariantF r1 a -> m (VariantF r3 b)

Traverse over some labels (with access to the containers) and use traverse f for the rest (just changing the index type).

traverse r f is like (traverse f >>> expand) # traverseSome r but with a more easily solved constraint (i.e. it can be solved once the type of r is known).

P purescript-variant M Data.Functor.Variant
traverse :: forall r rl ri ro r1 r2 r3 m. RowToList r rl => VariantTraverseCases m rl ri ro => Union ri r2 r1 => Union ro r2 r3 => Applicative m => Record r -> Variant r1 -> m (Variant r3)

Traverse over some labels and leave the rest unchanged. (Implemented by expanding after traverseSome.)

P purescript-variant M Data.Variant
traverse :: forall a t. TypedArray a t => (t -> Effect t) -> ArrayView a -> Effect (ArrayView a)

Traverses over each value, returning a new one.

P purescript-arraybuffer M Data.ArrayBuffer.Typed
traverse :: forall a b m. MonadRec m => (b -> a -> m b) -> b -> Producer a m Unit -> m b

Fold every value produced with a monadic action

Uses MonadRec, supporting producers of arbitrary length.

P purescript-node-stream-pipes M Pipes.Collect
traverse :: forall m p q a b. Dissect p q => MonadRec m => (a -> m b) -> p a -> m (p b)

A tail-recursive traverse operation, implemented in terms of Dissect.

Derived from: https://blog.functorial.com/posts/2017-06-18-Stack-Safe-Traversals-via-Dissection.html

P purescript-dissect M Dissect.Class
traverse :: forall barbie f g context. Traversable barbie => Applicative context => (forall a. f a -> context (g a)) -> barbie f -> context (barbie g)
P purescript-barbies M Data.Barbie
traverse :: forall w a. Ord a => a -> Graph a w -> List a

Perform a depth-frist traversal of a graph from a starting vertex. Returns a List of the visited vertices.

P purescript-digraph M Data.Graph
traverse :: forall t m b a. HasTraverse t => HasApply m => HasMap m => HasPure m => (a -> m b) -> t a -> m (t b)
P purescript-neon M Neon.Class.HasTraverse
traverse :: forall a o i r. (i -> Run r o) -> Run (Client i o r) a -> Run r a

Fulfills a Client with effects.

P purescript-run-streaming M Run.Streaming.Pull
traverse :: forall a o i r. (o -> Run r i) -> Run (Server i o r) a -> Run r a

Loops over a Server/Producer with effects, feeding the result in as a request.

P purescript-run-streaming M Run.Streaming.Push
traverse :: forall m b a. Applicative m => Ord b => (a -> m b) -> List a -> m (Either (Set b) (List b))
P purescript-unique-lists M Data.List.Unique
traverse1 :: forall t a b f. Traversable1 t => Apply f => (a -> f b) -> t a -> f (t b)
P purescript-foldable-traversable M Data.Semigroup.Traversable
traverse_ :: forall a b f m. Applicative m => Foldable f => (a -> m b) -> f a -> m Unit

Traverse a data structure, performing some effects encoded by an Applicative functor at each value, ignoring the final result.

For example:

traverse_ print [1, 2, 3]
P purescript-foldable-traversable M Data.Foldable
traversed :: forall t a b. Traversable t => Traversal (t a) (t b) a b

A Traversal for the elements of a Traversable functor.

over traversed negate [1, 2, 3] == [-1,-2,-3]
over traversed negate (Just 3) == Just -3
P purescript-profunctor-lenses M Data.Lens.Traversal
traverse_ :: forall a t. TypedArray a t => (t -> Effect Unit) -> ArrayView a -> Effect Unit

Traverses over each value.

P purescript-arraybuffer M Data.ArrayBuffer.Typed
traverse_ :: forall f m a. Foldable f => MonadRec m => (a -> m Unit) -> f a -> m Unit

Safely traverse a foldable container.

P purescript-safely M Control.Safely
traverseR :: forall t f u g m. Recursive t f => Corecursive u g => Functor m => (f t -> m (g u)) -> t -> m u
P purescript-matryoshka M Matryoshka.Util
traverse_ :: forall value. (value -> Effect Unit) -> Iterator value -> Effect Unit

Consumes all values in the Iterator.

P purescript-iterable M Data.Iterable
traverse' :: forall rw b a. (a -> Effect b) -> Signal (read :: READ | rw) a -> Effect (Signal (read :: READ, write :: WRITE) b)

Same as map, but where each transformation might be effectful.

P purescript-zeta M Zeta.Compat
traverse1 :: forall t m f g. Traversable1 t => Applicative m => (forall a. f a -> m (g a)) -> t f -> m (t g)
P purescript-functor1 M Data.Traversable1
traverse_ :: forall barbie context f b. Traversable barbie => Applicative context => (forall a. f a -> context b) -> barbie f -> context Unit
P purescript-barbies M Data.Barbie
traverse1_ :: forall t f a b. Foldable1 t => Apply f => (a -> f b) -> t a -> f Unit

Traverse a data structure, performing some effects encoded by an Apply instance at each value, ignoring the final result.

P purescript-foldable-traversable M Data.Semigroup.Foldable
traverseOf :: forall f s t a b. Optic (Star f) s t a b -> (a -> f b) -> s -> f t

Turn a pure profunctor Traversal into a lens-like Traversal.

P purescript-profunctor-lenses M Data.Lens.Traversal
traverseOne :: forall sym f g a b r1 r2 r3 r4 m. Cons sym f r1 r2 => Cons sym g r4 r3 => IsSymbol sym => Functor g => Functor m => Proxy sym -> (f a -> m (g b)) -> (VariantF r1 a -> m (VariantF r3 b)) -> VariantF r2 a -> m (VariantF r3 b)

Traverse over one case of a variant (in a functorial/monadic context m), putting the result back at the same label, with a fallback function.

P purescript-variant M Data.Functor.Variant
traverseOne :: forall sym a b r1 r2 r3 r4 m. IsSymbol sym => Cons sym a r1 r2 => Cons sym b r4 r3 => Functor m => Proxy sym -> (a -> m b) -> (Variant r1 -> m (Variant r3)) -> Variant r2 -> m (Variant r3)

Traverse over one case of a variant (in a functorial/monadic context m), putting the result back at the same label, with a fallback function.

P purescript-variant M Data.Variant
traverseOf_ :: forall f s t a b r. Applicative f => Fold (Endo Function (f Unit)) s t a b -> (a -> f r) -> s -> f Unit

Traverse the foci of a Fold, discarding the results.

P purescript-profunctor-lenses M Data.Lens.Fold
traverseRow :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f Row
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseSome :: forall r rl rlo ri ro r1 r2 r3 r4 a b m. RowToList r rl => VariantFTraverseCases m rl ri ro a b => RowToList ro rlo => VariantTags rlo => VariantFMaps rlo => Union ri r2 r1 => Union ro r4 r3 => Functor m => Record r -> (VariantF r2 a -> m (VariantF r3 b)) -> VariantF r1 a -> m (VariantF r3 b)

Traverse over several cases of a variant using a Record containing traversals. Each case gets put back at the same label it was matched at, i.e. its label in the record. Labels not found in the record are handled using the fallback function.

P purescript-variant M Data.Functor.Variant
traverseSome :: forall r rl ri ro r1 r2 r3 r4 m. RowToList r rl => VariantTraverseCases m rl ri ro => Union ri r2 r1 => Union ro r4 r3 => Functor m => Record r -> (Variant r2 -> m (Variant r3)) -> Variant r1 -> m (Variant r3)

Traverse over several cases of a variant using a Record containing traversals. Each case gets put back at the same label it was matched at, i.e. its label in the record. Labels not found in the record are handled using the fallback function.

P purescript-variant M Data.Variant
traverseVFRL :: forall rl row f a b. TraversableVFRL rl row => Applicative f => Proxy rl -> (a -> f b) -> VariantF row a -> f (VariantF row b)
P purescript-variant M Data.Functor.Variant
traverseDecl :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnDecl (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Declaration
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseExpr :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Expr
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseType :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f Type
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseLetIn :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f LetIn
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseWhere :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Where
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseBound :: forall a b c f m. Traversable f => Applicative m => (b -> m c) -> Scope b f a -> m (Scope c f a)
P purescript-bound M Bound
traverseScope :: forall a b c d f m. Traversable f => Applicative m => (b -> m d) -> (a -> m c) -> Scope b f a -> m (Scope d f c)
P purescript-bound M Bound
traverseBinder :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Binder
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseCaseOf :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f CaseOf
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseLambda :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Lambda
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseModule :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnDecl (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Module
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseBound_ :: forall a b c f m. Foldable f => Applicative m => (b -> m c) -> Scope b f a -> m Unit
P purescript-bound M Bound
P purescript-record-extra-srghma M Record.ExtraSrghma.TraverseRecord
traverseRecord :: forall rowF rowA rowOut rowList m. RowToList rowF rowList => TraverseRecord rowList rowF rowA () rowOut m => Record rowF -> Record rowA -> m (Record rowOut)
P purescript-record-extra-srghma M Record.ExtraSrghma.TraverseRecord
traverseScope_ :: forall a b c d f m. Foldable f => Applicative m => (b -> m d) -> (a -> m c) -> Scope b f a -> m Unit
P purescript-bound M Bound
traverseDefault :: forall t a b m. Traversable t => Applicative m => (a -> m b) -> t a -> m (t b)

A default implementation of traverse using sequence and map.

P purescript-foldable-traversable M Data.Traversable
traverseDefault :: forall i t a b m. TraversableWithIndex i t => Applicative m => (a -> m b) -> t a -> m (t b)

A default implementation of traverse in terms of traverseWithIndex

P purescript-foldable-traversable M Data.TraversableWithIndex
traverseDoBlock :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f DoBlock
P purescript-language-cst-parser M PureScript.CST.Traversal