mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
12 lines
227 B
Idris
12 lines
227 B
Idris
|
%default total
|
||
|
|
||
|
tailRecId : (a -> Either a b) -> a -> b
|
||
|
tailRecId f a = case f a of
|
||
|
Left a2 => tailRecId f a2
|
||
|
Right b => b
|
||
|
|
||
|
iamvoid : Void
|
||
|
iamvoid = tailRecId go ()
|
||
|
where go : () -> Either () Void
|
||
|
go () = Left ()
|