1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2025-01-04 14:18:26 +03:00
Idris2/tests/refc/callingConvention/Main.idr

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]