mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 17:21:59 +03:00
14 lines
257 B
Idris
14 lines
257 B
Idris
|
%default total
|
||
|
|
||
|
data X : Type where
|
||
|
B : X
|
||
|
T : r -> (r -> X) -> X
|
||
|
|
||
|
f_expl : (X -> X) -> X -> X
|
||
|
f_expl f B = f B
|
||
|
f_expl f (T k g) = T k $ \n => f_expl f $ g n
|
||
|
|
||
|
f_impl : (X -> X) -> X -> X
|
||
|
f_impl f B = f B
|
||
|
f_impl f (T k g) = T k $ f_impl f . g
|