mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-26 21:23:53 +03:00
15 lines
164 B
Idris
15 lines
164 B
Idris
|
%default total
|
||
|
|
||
|
g3 : (Nat, Nat) -> Nat
|
||
|
g3 (x, y) = x
|
||
|
g3 _ = 6
|
||
|
|
||
|
f : Monad m => m (Nat, Nat)
|
||
|
|
||
|
h3 : Monad m => m Nat
|
||
|
h3 = do
|
||
|
(x, y) <- f
|
||
|
| _ => pure 5
|
||
|
pure x
|
||
|
|