Search results
toUnfoldable :: forall f. Unfoldable f => Array ~> f
Convert an Array
into an Unfoldable
structure.
toUnfoldable :: forall f a. Unfoldable f => NonEmptyArray a -> f a
toUnfoldable :: forall f. Unfoldable f => List ~> f
Convert a list into any unfoldable structure.
Running time: O(n)
toUnfoldable :: forall f. Unfoldable f => List ~> f
Convert a list into any unfoldable structure.
Running time: O(n)
toUnfoldable :: forall f. Unfoldable f => NonEmptyList ~> f
toUnfoldable :: forall f. Unfoldable f => NonEmptyList ~> f
toUnfoldable :: forall f k v. Unfoldable f => Map k v -> f (Tuple k v)
Convert a map to an unfoldable structure of key/value pairs where the keys are in ascending order
toUnfoldable :: forall f a. Unfoldable f => Set a -> f a
Convert a set to an unfoldable structure.
toUnfoldable :: forall f a. Unfoldable f => NonEmptySet a -> f a
Convert a set to an unfoldable structure.
toUnfoldable :: forall f a. Unfoldable f => Object a -> f (Tuple String a)
Unfolds a map into a list of key/value pairs
toUnfoldable :: forall f a. Unfoldable f => HashSet a -> f a
Turn a set into an unfoldable functor.
You probably want to use toArray
instead, especially if you
want to get an array out.
toUnfoldable :: forall f s a. Unfoldable f => Nat s => Vec s a -> f a
Convert a vector into any Unfoldable
.
toUnfoldable :: forall f g i o. Unfoldable g => Comonad f => i -> MealyT f i o -> g o
Extract all the outputs of a machine, given some input.
toUnfoldable :: forall f. Unfoldable f => TokenList -> f SourceToken
toUnfoldable :: forall f. Unfoldable f => OSet ~> f
toUnfoldable :: forall f. Functor f => Unfoldable f => Seq ~> f
Probably O(n), but depends on the Unfoldable instance. Turn a Seq
into
any Unfoldable
.
toUnfoldable :: forall f. Functor f => Unfoldable f => Seq ~> f
Probably O(n), but depends on the Unfoldable instance. Turn a Seq
into
any Unfoldable
.
toUnfoldable :: forall f. Functor f => Unfoldable f => OrdSeq ~> f
Probably O(n), but depends on the Unfoldable instance. Unfold an ordered sequence in ascending order.
toUnfoldable :: forall f. Unfoldable f => JArray -> f JSON
Unfolds a JArray
into JSON
items
toUnfoldable :: forall f. Unfoldable f => JObject -> f (Tuple String JSON)
Unfolds an object into key/value pairs.
toUnfoldable :: forall f. Unfoldable f => Headers -> f (Tuple String String)
toUnfoldable :: forall f k v. Key k => Unfoldable f => Map k v -> f (Tuple k v)
Unfolds a map into a list of key/value pairs
toUnfoldable :: forall f. Unfoldable f => ArrayView ~> f
toUnfoldable :: forall a f. Unfoldable f => NonEmptyArrayView a -> f a
toUnfoldable :: forall f. Unfoldable f => Headers -> f (Tuple String String)
toUnfoldable :: forall f k v. Unfoldable f => Newtype k String => ObjectMap k v -> f (Tuple k v)
toUnfoldable :: forall f. Unfoldable f => Headers -> f (Tuple String String)
toUnfoldable :: forall f. Unfoldable f => List ~> f
Convert a List
into an Unfoldable
structure.
toUnfoldable :: forall f t a. Unfoldable f => SafeList t a -> f a
Converts a SafeList
into some unfoldable structure.
toUnfoldable :: forall v k p f. Unfoldable f => Unfoldable p => Trie k v -> f (Tuple (p k) v)
toUnfoldable :: forall a f. Unfoldable f => List a -> f a
toUnfoldable :: forall f. Unfoldable f => Headers -> f (Tuple String String)
toUnfoldable1 :: forall f a. Unfoldable1 f => NonEmptyArray a -> f a
toUnfoldable1 :: forall f a. Unfoldable1 f => NonEmptySet a -> f a
Convert a set to a non-empty unfoldable structure.
toUnfoldable1 :: forall f. Functor f => Unfoldable1 f => Seq ~> f
Probably O(n), but depends on the Unfoldable instance. Turn a Seq
into
any Unfoldable1
.
toUnfoldable1 :: forall a f. Unfoldable1 f => NonEmptyArrayView a -> f a
toUnfoldableBy :: forall v k a f. Unfoldable f => (k -> v -> a) -> HashMap k v -> f a
Convert a HashMap to an unfoldable functor, like Array
or List
This takes a function from key and value to the element type of
the result. For example, fixing the functor to Array
, passing
Tuple
will result in an array of key-value pairs.
toUnfoldableBy Tuple m == toUnfoldableUnordered m
toUnfoldableBy const m == keys m
toUnfoldableBy (flip const) m == values m
toUnfoldableUnordered :: forall f k v. Unfoldable f => Map k v -> f (Tuple k v)
Convert a map to an unfoldable structure of key/value pairs
While this traversal is up to 10% faster in benchmarks than toUnfoldable
,
it leaks the underlying map stucture, making it only suitable for applications
where order is irrelevant.
If you are unsure, use toUnfoldable
toUnfoldableUnordered :: forall v k f. Unfoldable f => HashMap k v -> f (Tuple k v)
Convert a map to an Unfoldable
of Tuple
s.
No particular ordering is guaranteed.
toUnfoldableDescending :: forall f a. Functor f => Unfoldable f => OrdSeq a -> f a
Probably O(n), but depends on the Unfoldable instance. Unfold an ordered sequence in descending order.
No further results.