(a -> b -> c -> d) -> f a -> f b -> f c -> f d

liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r
base Control.Monad
Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).
liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
base Control.Applicative
Lift a ternary function to actions.
zipWith3 :: (a -> b -> c -> d) -> Seq a -> Seq b -> Seq c -> Seq d
containers Data.Sequence
O(min(n1,n2,n3)). zipWith3 takes a function which combines three elements, as well as three sequences and returns a sequence of their point-wise combinations, analogous to zipWith.
zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
base Prelude, base Data.List
The zipWith3 function takes a function which combines three elements, as well as three lists and returns a list of their point-wise combination, analogous to zipWith.
insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> IntMap a -> IntMap a
containers Data.IntMap.Lazy
O(min(n,W)). Insert with a combining function. insertWithKey f key value mp will insert the pair (key, value) into mp if key does not exist in the map. If the key does exist, the function will insert f key new_value old_value. > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxx|a")] > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")] > insertWithKey f 5 "xxx" empty == singleton 5 "xxx"
insertWithKey :: (Key -> a -> a -> a) -> Key -> a -> IntMap a -> IntMap a
containers Data.IntMap.Strict
O(min(n,W)). Insert with a combining function. insertWithKey f key value mp will insert the pair (key, value) into mp if key does not exist in the map. If the key does exist, the function will insert f key new_value old_value. > let f key new_value old_value = (show key) ++ ":" ++ new_value ++ "|" ++ old_value > insertWithKey f 5 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "5:xxx|a")] > insertWithKey f 7 "xxx" (fromList [(5,"a"), (3,"b")]) == fromList [(3, "b"), (5, "a"), (7, "xxx")] > insertWithKey f 5 "xxx" empty == singleton 5 "xxx" If the key exists in the map, this function is lazy in x but strict in the result of f.
insertWithKey' :: (Key -> a -> a -> a) -> Key -> a -> IntMap a -> IntMap a
containers Data.IntMap
Deprecated. As of version 0.5, replaced by insertWithKey. O(log n). Same as insertWithKey, but the result of the combining function is evaluated to WHNF before inserted to the map.