mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 01:41:44 +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]
|