mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 10:02:03 +03:00
12 lines
292 B
Idris
12 lines
292 B
Idris
import Data.List
|
|
|
|
mkList : a -> Nat -> List a
|
|
mkList x Z = ?help
|
|
mkList x (S k) = x :: mkList x k
|
|
|
|
-- For a performance test: make sure we evaluate the full list, and get
|
|
-- a result that we don't have to work hard to render
|
|
isEven : Nat -> Bool
|
|
isEven Z = True
|
|
isEven (S k) = not (isEven k)
|