Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
spanJust :: (a -> Maybe b) -> [a] -> (Prefix b, Suffix a)Agda Agda.Utils.List A generalized version of span. O(length . fst . spanJust f).
takeWhileJust :: (a -> Maybe b) -> [a] -> Prefix bAgda Agda.Utils.List A generalized version of takeWhile. (Cf. mapMaybe vs. filter). @O(length . takeWhileJust f). takeWhileJust f = fst . spanJust f.
adjustM :: (Functor f, Ord k) => (v -> f v) -> k -> Map k v -> f (Map k v)Agda Agda.Utils.Map Update monadically the value at one position (must exist!).
adjustM' :: (Functor f, Ord k) => (v -> f (a, v)) -> k -> Map k v -> f (a, Map k v)Agda Agda.Utils.Map Wrapper for adjustM for convenience.
allJustM :: Monad m => [m (Maybe a)] -> m (Maybe [a])Agda Agda.Utils.Maybe Lazy version of allJust . sequence. (allJust = mapM for the Maybe monad.) Only executes monadic effect while isJust.
ifJust :: Maybe a -> (a -> b) -> b -> bAgda Agda.Utils.Maybe caseMaybe with flipped branches.
ifJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m b -> m bAgda Agda.Utils.Maybe caseMaybeM with flipped branches.
whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()Agda Agda.Utils.Maybe A more telling name for forM_ for the Maybe collection type. Or: caseMaybe without the Nothing case.
whenJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m ()Agda Agda.Utils.Maybe caseMaybeM without the Nothing case.
ifJustM :: Monad m => m (Maybe a) -> (a -> m b) -> m b -> m bAgda Agda.Utils.Maybe.Strict caseMaybeM with flipped branches.