Search results
zip :: forall a b. Array a -> Array b -> Array (Tuple a b)
Takes two arrays and returns an array of corresponding pairs. If one input array is short, excess elements of the longer array are discarded.
zip [1, 2, 3] ["a", "b"] = [Tuple 1 "a", Tuple 2 "b"]
zip :: forall a b. NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray (Tuple a b)
zip :: forall a b. List a -> List b -> List (Tuple a b)
Collect pairs of elements at the same positions in two lists.
Running time: O(min(m, n))
zip :: forall a b. List a -> List b -> List (Tuple a b)
Collect pairs of elements at the same positions in two lists.
Running time: O(min(m, n))
zip :: forall a b. NonEmptyList a -> NonEmptyList b -> NonEmptyList (Tuple a b)
zip :: forall s1 s2 s3 a b. Min s1 s2 s3 => Vec s1 a -> Vec s2 b -> Vec s3 (Tuple a b)
Zip two vectors together into a vector of tuples.
The new vector will be the size of the smallest input vector, and superfluous elements from the other will be discarded.
zip :: forall a b m. MonadRec m => Producer a m Unit -> Producer b m Unit -> Producer (a /\ b) m Unit
zip :: forall b a. OSet a -> OSet b -> OSet (Tuple a b)
Zips together two List'
s.
zip :: forall x y z lproxy. Zip x y z => lproxy x -> lproxy y -> lproxy z
zip :: forall db b da a k. Ord k => Patch a da => Patch b db => Jet (IMap k a) -> Jet (IMap k b) -> Jet (IMap k (Tuple a b))
Zip two maps, keeping those keys which are common to both input maps.
zip :: forall a. Array (Observable a) -> Observable (Array a)
Waits for each ObservableImpl to emit a value. Once this occurs, all values
with the corresponding index will be emitted. This will continue until at
least one inner ObservableImpl completes.
zip :: forall a b. TwoOrMore a -> TwoOrMore b -> TwoOrMore (a /\ b)
zip :: forall b a. ArrayView a -> ArrayView b -> ArrayView (Tuple a b)
zip :: forall b a. NonEmptyArrayView a -> NonEmptyArrayView b -> NonEmptyArrayView (Tuple a b)
Zip :: MIME
Zip :: MimeType
zip :: forall b a. List a -> List b -> List (Tuple a b)
zip :: forall a b. Iterable a -> Iterable b -> Iterable (Tuple a b)
zip :: forall f b a. Container f => f a -> f b -> f (Tuple a b)
zip :: forall p x a b. Profunctor p => Semigroupal Function Tuple Tuple Tuple p => p x a -> p x b -> p x (a /\ b)
zip :: ContentType
zip :: forall b a x p. Semigroupal Function Tuple Tuple Tuple p => p x a -> p x b -> p x (a /\ b)
zip :: forall b a. List a -> List b -> List (Tuple a b)
Takes two lists and returns an list of corresponding pairs. If one input list is short, excess elements of the longer list are discarded.
Running time: O(n)
.
zip :: forall a j i r. Run (Producer i (Producer (Tuple i j) r)) a -> Run (Producer j (Producer (Tuple i j) r)) a -> Run (Producer (Tuple i j) r) a
Joins two Producers with a Tuple.
zip :: forall c b a. (a -> b -> c) -> Observable a -> Observable b -> Observable c
zip :: forall a. Array (Observable a) -> Observable (Array a)
Waits for each ObservableImpl to emit a value. Once this occurs, all values
with the corresponding index will be emitted. This will continue until at
least one inner ObservableImpl completes.
zip :: forall a. Array (AsyncSubject a) -> AsyncSubject (Array a)
Waits for each AsyncSubject to emit a value. Once this occurs, all values with the corresponding index will be emitted. This will continue until at least one inner AsyncSubject completes.
zip :: forall a. Array (BehaviorSubject a) -> BehaviorSubject (Array a)
Waits for each BehaviorSubject to emit a value. Once this occurs, all values with the corresponding index will be emitted. This will continue until at least one inner BehaviorSubject completes.
zip :: forall a. Array (Observable a) -> Observable (Array a)
Waits for each Observable to emit a value. Once this occurs, all values
with the corresponding index will be emitted. This will continue until at
least one inner observable completes.
zip :: forall a. Array (ReplaySubject a) -> ReplaySubject (Array a)
Waits for each ReplaySubject to emit a value. Once this occurs, all values with the corresponding index will be emitted. This will continue until at least one inner ReplaySubject completes.
zipE :: forall b a h w. Nat w => Nat h => Matrix h w a -> Matrix h w b -> Matrix h w (Tuple a b)
Zip Matrices with Exactly the same size
> zipE (matrix22 1 2 0 0) (matrix22 1 3 4 5)
[(Tuple 1 1),(Tuple 2 3)]
[(Tuple 0 4),(Tuple 0 5)]
Zipper :: forall k v. (Trie k v) -> (List (Ctx k v)) -> Zipper k v
zipWith :: forall a b c. (a -> b -> c) -> Array a -> Array b -> Array c
Apply a function to pairs of elements at the same index in two arrays, collecting the results in a new array.
If one array is longer, elements will be discarded from the longer array.
For example
zipWith (*) [1, 2, 3] [4, 5, 6, 7] == [4, 10, 18]
zipWith :: forall a b c. (a -> b -> c) -> NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray c
ZipList
is a newtype around List
which provides a zippy
Applicative
instance.
ZipList :: forall a. (List a) -> ZipList a
zipWith :: forall a b c. (a -> b -> c) -> List a -> List b -> List c
Apply a function to pairs of elements at the same positions in two lists, collecting the results in a new list.
If one list is longer, elements will be discarded from the longer list.
For example
zipWith (*) (1 : 2 : 3 : Nil) (4 : 5 : 6 : 7 Nil) == 4 : 10 : 18 : Nil
Running time: O(min(m, n))
zipWith :: forall a b c. (a -> b -> c) -> List a -> List b -> List c
Apply a function to pairs of elements at the same positions in two lists, collecting the results in a new list.
If one list is longer, elements will be discarded from the longer list.
For example
zipWith (*) (1 : 2 : 3 : Nil) (4 : 5 : 6 : 7 Nil) == 4 : 10 : 18 : Nil
Running time: O(min(m, n))
zipWith :: forall a b c. (a -> b -> c) -> NonEmptyList a -> NonEmptyList b -> NonEmptyList c
zipWith :: forall f a b c. Monad f => (a -> b -> c) -> ListT f a -> ListT f b -> ListT f c
Zip the elements of two lists, combining elements at the same position from each list.
Zipping :: forall a b. (a -> a -> b) -> Zipping a b
zipWith :: forall s1 s2 s3 a b c. Min s1 s2 s3 => (a -> b -> c) -> Vec s1 a -> Vec s2 b -> Vec s3 c
Zip two vectors together using a combining function.
The new vector will be the size of the smallest input vector, and superfluous elements from the other will be discarded.
zipWith :: forall f i a b c. Apply f => (a -> b -> c) -> MealyT f i a -> MealyT f i b -> MealyT f i c
Zip two machines together under some function f
.
zipWith :: forall c b a. Eq c => (a -> b -> c) -> OSet a -> OSet b -> OSet c
zipWith :: forall c b a. (a -> b -> c) -> Matrix a -> Matrix b -> Maybe (Matrix c)
Combines two Matrices with the same dimensions by combining elements at the same index with the given function. Returns Nothing on a dimension mismatch.
zipCode :: Faker -> { format :: Maybe String, state :: Maybe String } -> Effect String
Generates random zip code from specified format
zipWith :: forall c b a. (a -> b -> c) -> ArrayView a -> ArrayView b -> ArrayView c
zipWith :: forall c b a. (a -> b -> c) -> NonEmptyArrayView a -> NonEmptyArrayView b -> NonEmptyArrayView c
zipWith :: (Number -> Number -> Number) -> Mat2 -> Mat2 -> Mat2
zipWith :: (Number -> Number -> Number) -> Mat2d -> Mat2d -> Mat2d
zipWith :: (Number -> Number -> Number) -> Mat3 -> Mat3 -> Mat3
zipWith :: (Number -> Number -> Number) -> Mat4 -> Mat4 -> Mat4
zipWith :: (Number -> Number -> Number) -> Quat -> Quat -> Quat
zipWith :: (Number -> Number -> Number) -> Vec2 -> Vec2 -> Vec2
zipWith :: (Number -> Number -> Number) -> Vec3 -> Vec3 -> Vec3
zipWith :: (Number -> Number -> Number) -> Vec4 -> Vec4 -> Vec4
zipWith :: forall c b a. (a -> b -> c) -> List a -> List b -> List c
zipWith :: forall a b c. (a -> b -> c) -> Iterable a -> Iterable b -> Iterable c
zipWith :: forall c b a. Fn2 a b c -> List a -> List b -> List c
zipWith :: forall f c b a. Container f => (a -> b -> c) -> f a -> f b -> f c
zipWith :: forall c b a. (a -> b -> c) -> List a -> List b -> List c
Apply a function to pairs of elements at the same index in two lists, collecting the results in a new list.
If one list is longer, elements will be discarded from the longer list.
Running time: O(n)
.
zipWith :: forall a k j i r. (i -> j -> k) -> Run (Producer i (Producer k r)) a -> Run (Producer j (Producer k r)) a -> Run (Producer k r) a
Joins two Producers into one.
zipWith :: forall c b a. (a -> b -> c) -> Series a -> Series b -> Series c
Join 2 series using given function.
Series will be joinned on index. It means that both series need to have the same index entries.
If only 1 series contains given index then this item will be dropped
zipWithA :: forall m a b c. Applicative m => (a -> b -> m c) -> Array a -> Array b -> m (Array c)
A generalization of zipWith
which accumulates results in some
Applicative
functor.
sndChars = zipWithA (\a b -> charAt 2 (a <> b))
sndChars ["a", "b"] ["A", "B"] = Nothing -- since "aA" has no 3rd char
sndChars ["aa", "b"] ["AA", "BBB"] = Just ['A', 'B']
zipWithA :: forall m a b c. Applicative m => (a -> b -> m c) -> NonEmptyArray a -> NonEmptyArray b -> m (NonEmptyArray c)
zipWithA :: forall m a b c. Applicative m => (a -> b -> m c) -> List a -> List b -> m (List c)
A generalization of zipWith
which accumulates results in some Applicative
functor.
zipWithA :: forall m a b c. Applicative m => (a -> b -> m c) -> List a -> List b -> m (List c)
A generalization of zipWith
which accumulates results in some Applicative
functor.
zipWithA :: forall m a b c. Applicative m => (a -> b -> m c) -> NonEmptyList a -> NonEmptyList b -> m (NonEmptyList c)
zipWith' :: forall f a b c. Monad f => (a -> b -> f c) -> ListT f a -> ListT f b -> ListT f c
Zip the elements of two lists, combining elements at the same position from each list.
zipWithE :: forall s a b c. (a -> b -> c) -> Vec s a -> Vec s b -> Vec s c
Zip two vectors with equal length together using a combining function.
zipWithA :: forall c b a m. Eq c => Applicative m => (a -> b -> m c) -> OSet a -> OSet b -> m (OSet c)
zipYield :: forall v x a. Gen v x a -> Gen v (Tuple Int x) a
Convert a generator into one that tags its output with successive unique integers
zipCode_ :: Faker -> Effect String
zipWithA :: forall c b a m. Applicative m => (a -> b -> m c) -> ArrayView a -> ArrayView b -> m (ArrayView c)
zipWithA :: forall c b a m. Applicative m => (a -> b -> m c) -> NonEmptyArrayView a -> NonEmptyArrayView b -> m (NonEmptyArrayView c)
zipWithA :: forall c b a m. Applicative m => (a -> b -> m c) -> List a -> List b -> m (List c)
A generalization of zipWith
which accumulates results in some
Applicative
functor.
Running time: O(n)
.
zipWithE :: forall c b a h w. Nat w => Nat h => (a -> b -> c) -> Matrix h w a -> Matrix h w b -> Matrix h w c
Zip Matrices with function with Exactly the same size
> zipWithE Tuple (matrix22 1 2 0 0) (matrix22 1 3 4 5)
[(Tuple 1 1),(Tuple 2 3)]
[(Tuple 0 4),(Tuple 0 5)]
zipWithOf :: forall s t a b. Optic Zipping s t a b -> (a -> a -> b) -> s -> s -> t
zipRecord :: forall ta ra tb rb rc. RowToList ra ta => RowToList rb tb => ZipRecord ta ra tb rb () rc => Record ra -> Record rb -> Record rc
zipGenOrr :: forall v a b. Monoid v => WidgetGen v a b -> Widget v (Either b (Tuple Int a))
Like genOrr
, collapses a Generator into one widget.
However, any values returned by the children are tagged with an id (unique to this generator)
Any new widgets generated are immediately inserted into the parent widget
Returns either (Left b) when Gen ends, or (Tuple Int a), when one of the children end.
zipRecord :: forall ta ra tb rb rc. RowToList ra ta => RowToList rb tb => ZipRecord ta ra tb rb () rc => Record ra -> Record rb -> Record rc
zipFWithOf :: forall f s t a b. Optic (Costar f) s t a b -> (f a -> b) -> (f s -> t)
zipActions :: forall cell state. Hashable state => Hashable cell => HashMap state cell -> HashMap state cell -> MultiSet (Tuple cell cell)
zipCodeImpl :: EffectFn2 Faker { format :: Undefinable String, state :: Undefinable String } String
Foreign function interface helpers
A ZipperArray
is represented by a NonEmptyArray
, an index into the
array, and the element at that index. The constructor is kept private so
that correctness guarantees can be ensured (as long as all the functions
are correct).