mirror of
https://github.com/edwinb/Idris2-boot.git
synced 2024-12-30 16:25:57 +03:00
10 lines
203 B
Idris
10 lines
203 B
Idris
IntOrChar : Bool -> Type
|
|
IntOrChar True = Int
|
|
IntOrChar False = Char
|
|
|
|
foo : Nat -> (x : Bool) -> IntOrChar x -> String
|
|
foo num x i
|
|
= case x of
|
|
True => show num
|
|
False => show i
|