mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-09-21 22:17:19 +03:00
15 lines
180 B
Idris
15 lines
180 B
Idris
module A
|
|
|
|
%default total
|
|
|
|
codata B = Z B | I B
|
|
|
|
showB : B -> String
|
|
showB (I x) = "I" ++ showB x
|
|
showB (Z x) = "Z" ++ showB x
|
|
|
|
instance Show B where show = showB
|
|
|
|
os : B
|
|
os = Z os
|