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"]
P purescript-arrays M Data.Array
zip :: forall a b. NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray (Tuple a b)
P purescript-arrays M Data.Array.NonEmpty
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))

P purescript-lists M Data.List
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))

P purescript-lists M Data.List.Lazy
zip :: forall a b. NonEmptyList a -> NonEmptyList b -> NonEmptyList (Tuple a b)
P purescript-lists M Data.List.NonEmpty
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.

P purescript-sized-vectors M Data.Vec
zip :: forall b a. OSet a -> OSet b -> OSet (Tuple a b)
P purescript-ordered-set M Data.Set.Ordered

Zips together two List's.

P purescript-typelevel-lists M Type.Data.List
zip :: forall x y z lproxy. Zip x y z => lproxy x -> lproxy y -> lproxy z
P purescript-typelevel-lists M Type.Data.List
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.

P purescript-incremental-functions M Data.Incremental.Map
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. marble diagram

P purescript-rxps M RxJS.Observable
zip :: forall a b. TwoOrMore a -> TwoOrMore b -> TwoOrMore (a /\ b)
P purescript-two-or-more M Data.TwoOrMore
zip :: forall b a. ArrayView a -> ArrayView b -> ArrayView (Tuple a b)
P purescript-array-views M Data.ArrayView
zip :: forall b a. NonEmptyArrayView a -> NonEmptyArrayView b -> NonEmptyArrayView (Tuple a b)
P purescript-array-views M Data.ArrayView.NonEmpty
Zip :: MimeType
P purescript-google-apps M Data.Google.Apps.Base.MimeType
zip :: forall b a. List a -> List b -> List (Tuple a b)
P purescript-infinite-lists M Data.List.Infinite
zip :: forall a b. Iterable a -> Iterable b -> Iterable (Tuple a b)
P purescript-js-iterators M JS.Iterable
zip :: forall f b a. Container f => f a -> f b -> f (Tuple a b)
P purescript-logoot-core M Data.Container
zip :: forall p x a b. Profunctor p => Semigroupal Function Tuple Tuple Tuple p => p x a -> p x b -> p x (a /\ b)
P purescript-monoidal M Data.Bifunctor.Monoidal.Specialized
zip :: ContentType
P purescript-payload M Payload.ContentType
zip :: forall b a x p. Semigroupal Function Tuple Tuple Tuple p => p x a -> p x b -> p x (a /\ b)
P purescript-profunctor-extra M Data.Profunctor.Monoidal
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).

P purescript-rrb-list M RRBList
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.

P purescript-run-streaming M Run.Streaming.Prelude
zip :: forall c b a. (a -> b -> c) -> Observable a -> Observable b -> Observable c
P purescript-rx M Rx.Observable
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. marble diagram

P purescript-rx-observable M RxJS.Observable
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.

P purescript-rxjs M RxJS.AsyncSubject
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.

P purescript-rxjs M RxJS.BehaviorSubject
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. marble diagram

P purescript-rxjs M RxJS.Observable
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.

P purescript-rxjs M RxJS.ReplaySubject
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)]
P purescript-sized-matrices M Data.Matrix
P purescript-typelevel-lists M Type.Data.List
P purescript-typelevel-lists M Type.Data.List
P purescript-search-trie M Data.Search.Trie.Internal
Zipper :: forall k v. (Trie k v) -> (List (Ctx k v)) -> Zipper k v
P purescript-search-trie M Data.Search.Trie.Internal
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]
P purescript-arrays M Data.Array
zipWith :: forall a b c. (a -> b -> c) -> NonEmptyArray a -> NonEmptyArray b -> NonEmptyArray c
P purescript-arrays M Data.Array.NonEmpty

ZipList is a newtype around List which provides a zippy Applicative instance.

P purescript-lists M Data.List.ZipList
ZipList :: forall a. (List a) -> ZipList a
P purescript-lists M Data.List.ZipList
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))

P purescript-lists M Data.List
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))

P purescript-lists M Data.List.Lazy
zipWith :: forall a b c. (a -> b -> c) -> NonEmptyList a -> NonEmptyList b -> NonEmptyList c
P purescript-lists M Data.List.NonEmpty
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.

P purescript-transformers M Control.Monad.List.Trans
P purescript-profunctor-lenses M Data.Lens.Internal.Zipping
Zipping :: forall a b. (a -> a -> b) -> Zipping a b
P purescript-profunctor-lenses M Data.Lens.Internal.Zipping
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.

P purescript-sized-vectors M Data.Vec
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.

P purescript-machines M Data.Machine.Mealy
zipWith :: forall c b a. Eq c => (a -> b -> c) -> OSet a -> OSet b -> OSet c
P purescript-ordered-set M Data.Set.Ordered
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.

P purescript-matrices M Matrix
zipWith :: forall c b a. (a -> b -> c) -> ArrayView a -> ArrayView b -> ArrayView c
P purescript-array-views M Data.ArrayView
zipWith :: forall c b a. (a -> b -> c) -> NonEmptyArrayView a -> NonEmptyArrayView b -> NonEmptyArrayView c
P purescript-array-views M Data.ArrayView.NonEmpty