mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-24 04:09:10 +03:00
12 lines
190 B
Idris
12 lines
190 B
Idris
module Main
|
|
|
|
%default total
|
|
|
|
last : List a -> a -> a
|
|
last [] x = x
|
|
last (y :: ys) _ = last ys y
|
|
|
|
main : IO ()
|
|
main = flip for_ (printLn . (`last` 0))
|
|
$ [] :: map (\ x => [1..x]) [1..5]
|