on master help sign in
Idris-dev/test/basic019/basic019.idr
10 lines 341 B history raw
1printRange : (t : Type) -> (Show t, Num t, Enum t) => IO ()
2printRange t = do printLn [(the t 1)..10]
3 printLn [(the t 10),9..1]
4 printLn (take 10 [(the t 1)..])
5 printLn (take 10 [(the t 1),3..])
7main : IO ()
8main = do printRange Nat
9 printRange Int
10 printRange Integer