mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-21 10:41:59 +03:00
12 lines
191 B
Idris
12 lines
191 B
Idris
module Main
|
|
|
|
foo : Int -> Int
|
|
foo x = case isLT of
|
|
Yes => x*2
|
|
No => x*4
|
|
where
|
|
data MyLT = Yes | No
|
|
|
|
isLT : MyLT
|
|
isLT = if x < 20 then Yes else No
|