Idris2/tests/idris2/spec001/Identity.idr

10 lines
174 B
Idris

%logging "compiler.identity" 5
%spec a
identity : List a -> List a
identity [] = []
identity (x :: xs) = x :: identity xs
test : List Nat -> List Nat
test ns = identity ns