Module
Data.Slice
- Package
- purescript-slices
- Repository
- jacereda/purescript-slices
A data type with O(1) take/drop using an array as the underlying storage.
#szipWith Source
szipWith :: forall c b a. (a -> b -> c) -> Slice a -> Slice b -> Slice c
Apply a function to pairs of elements at the same index in two slices, collecting the results in a new slice.
If one slice is longer, elements will be discarded from the longer slice.
For example
szipWith (*) (slice [1, 2, 3]) (slice [4, 5, 6, 7]) == slice [4, 10, 18]
- Modules
- Data.
Slice