mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 02:31:50 +03:00
11 lines
178 B
Idris
11 lines
178 B
Idris
|
|
import Data.Fin
|
|
|
|
autobind infixr 0 >>
|
|
|
|
(>>) : Monad m => m a -> (a -> m b) -> m b
|
|
(>>) = (>>=)
|
|
|
|
both : Maybe (Nat, Nat) -> Maybe Nat
|
|
both m = (MkPair x y := m) >>= Just (x + y)
|