Skip to content

Commit d9efd34

Browse files
committed
Add strict liftM
1 parent 9243b9b commit d9efd34

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Control/DeepSeq.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ f $!! x = x `deepseq` f x
209209
force :: (NFData a) => a -> a
210210
force x = x `deepseq` x
211211

212+
-- | Deeply strict version of 'Control.Applicative.<$>'.
213+
--
214+
-- @since 1.4.3.0
215+
(<$!!>) :: (Monad m, NFData b) => (a -> b) -> m a -> m b
216+
f <$!!> m = m >>= \x -> return $!! f x
217+
infixl 4 <$!!>
218+
212219
-- | A class of types that can be fully evaluated.
213220
--
214221
-- @since 1.1.0.0

0 commit comments

Comments
 (0)