relude-0.7.0.0: Safe, performant, user-friendly and lightweight Haskell Standard Library
Copyright(c) 2016 Stephen Diehl
(c) 2016-2018 Serokell
(c) 2018-2020 Kowainik
LicenseMIT
MaintainerKowainik <xrom.xkov@gmail.com>
StabilityStable
PortabilityPortable
Safe HaskellSafe
LanguageHaskell2010

Relude.Monad

Description

Reexporting useful monadic stuff.

Synopsis

Documentation

Reexports functions to work with different monads.

Provided new combinators to work with Maybe data type.

Provided new combinators to work with Either data type.

Monad transformers functions and combinators.

chainedTo :: Monad m => (a -> m b) -> m a -> m b Source #

For chaining monadic operations in forward applications using (&) Named version of =<<.

>>> Just [ 1 :: Int ] & chainedTo (viaNonEmpty head)
Just 1
>>> Nothing & chainedTo (viaNonEmpty head)
Nothing

Since: 0.5.0