Skip to content

Commit 347245e

Browse files
committed
Add zpWithA
1 parent 16529b0 commit 347245e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Data/Traversable.purs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Data.Traversable where
22

33
import Prelude
4-
import Data.Array ((:))
4+
import Data.Array ((:), zipWith)
55
import Data.Either
66
import Data.Eq
77
import Data.Foldable
@@ -45,3 +45,7 @@ instance traversableTuple :: Traversable (Tuple a) where
4545

4646
for :: forall a b m t. (Applicative m, Traversable t) => t a -> (a -> m b) -> m (t b)
4747
for x f = traverse f x
48+
49+
zipWithA :: forall m a b c. (Applicative m) => (a -> b -> m c) -> [a] -> [b] -> m [c]
50+
zipWithA f xs ys = sequence (zipWith f xs ys)
51+

0 commit comments

Comments
 (0)