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
traverseForeign :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f Foreign
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseGuarded :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Guarded
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseLabeled :: forall f a b. Applicative f => (b -> f b) -> Rewrite b f (Labeled a)
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseTextBox :: forall h g f. Applicative h => (forall a. f a -> h (g a)) -> TextBox f -> h (TextBox g)
P purescript-markdown M Text.Markdown.SlamDown.Syntax.TextBox
traverseWrapped :: forall f a. Applicative f => (a -> f a) -> Rewrite a f Wrapped
P purescript-language-cst-parser M PureScript.CST.Traversal
traverse1Default :: forall t a b m. Traversable1 t => Apply m => (a -> m b) -> t a -> m (t b)

A default implementation of traverse1 using sequence1.

P purescript-foldable-traversable M Data.Semigroup.Traversable
traverseByWither :: forall t m a b. Witherable t => Applicative m => (a -> m b) -> t a -> m (t b)

A default implementation of traverse given a Witherable.

P purescript-filterable M Data.Witherable
traverseAdoBlock :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f AdoBlock
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseDataCtor :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f DataCtor
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseDataHead :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f DataHead
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseInstance :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f Instance
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseWithIndex :: forall i t a b m. TraversableWithIndex i t => Applicative m => (i -> a -> m b) -> t a -> m (t b)
P purescript-foldable-traversable M Data.TraversableWithIndex
traverseWithIndex :: forall a t. TypedArray a t => (Index -> t -> Effect t) -> ArrayView a -> Effect (ArrayView a)

Traverses over each value, returning a new one.

P purescript-arraybuffer M Data.ArrayBuffer.Typed
traverseClassHead :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f ClassHead
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseDelimited :: forall f a. Applicative f => (a -> f a) -> Rewrite a f Delimited
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseFormField :: forall a h g f. Applicative h => (forall x. f x -> h (g x)) -> FormFieldP f a -> h (FormFieldP g a)
P purescript-markdown M Text.Markdown.SlamDown.Syntax.FormField
traverseSeparated :: forall f a. Applicative f => (a -> f a) -> Rewrite a f Separated
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseWithIndex_ :: forall i a b f m. Applicative m => FoldableWithIndex i f => (i -> a -> m b) -> f a -> m Unit

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

For example:

> traverseWithIndex_ (curry logShow) ["a", "b", "c"]
(Tuple 0 "a")
(Tuple 1 "b")
(Tuple 2 "c")
P purescript-foldable-traversable M Data.FoldableWithIndex
traverseWithIndex_ :: forall a t. TypedArray a t => (Index -> t -> Effect Unit) -> ArrayView a -> Effect Unit

Traverses over each value.

P purescript-arraybuffer M Data.ArrayBuffer.Typed
traverseIfThenElse :: forall e f r. Applicative f => Record (OnExpr (Rewrite e f)) + r -> Rewrite e f IfThenElse
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseLetBinding :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f LetBinding
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseModuleBody :: 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 ModuleBody
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseRecordImpl :: forall rowList rowF rowA from to m. TraverseRecord rowList rowF rowA from to m => Record rowF -> Record rowA -> m (Builder (Record from) (Record to))
P purescript-record-extra-srghma M Record.ExtraSrghma.TraverseRecord
traverseDoStatement :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f DoStatement
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseGuardedExpr :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f GuardedExpr
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseExprAppSpine :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f (AppSpine Expr)
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseInstanceHead :: forall e f r. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f InstanceHead
P purescript-language-cst-parser M PureScript.CST.Traversal
traversePatternGuard :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f PatternGuard
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseRecordUpdate :: forall e f r. Applicative f => Record (OnExpr (Rewrite e f)) + r -> Rewrite e f RecordUpdate
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseRecordLabeled :: forall f a. Applicative f => (a -> f a) -> Rewrite a f RecordLabeled
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseOneOrDelimited :: forall a f. Applicative f => (a -> f a) -> Rewrite a f OneOrDelimited
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseRecordAccessor :: forall e f r. Applicative f => Record (OnExpr (Rewrite e f)) + r -> Rewrite e f RecordAccessor
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseTypeVarBinding :: forall e f r a. Applicative f => Record (OnType (Rewrite e f)) + r -> Rewrite e f (TypeVarBinding a)
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseInstanceBinding :: forall e f r. Applicative f => Record (OnBinder (Rewrite e f)) + (OnExpr (Rewrite e f)) + (OnType (Rewrite e f)) + r -> Rewrite e f InstanceBinding
P purescript-language-cst-parser M PureScript.CST.Traversal
traverseWithIndexDefault :: forall i t a b m. TraversableWithIndex i t => Applicative m => (i -> a -> m b) -> t a -> m (t b)

A default implementation of traverseWithIndex using sequence and mapWithIndex.

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

No further results.