mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
43d114f9b1
Progress for #1742 * Remove putStr and putStrLn * Remove named Nats (one, two, ...)
15 lines
313 B
Plaintext
15 lines
313 B
Plaintext
module HigherOrderLambda;
|
|
|
|
open import Stdlib.Prelude;
|
|
|
|
map' : {A : Type} → {B : Type} → (A → B) → List A → List B;
|
|
map' f := \{ nil := nil; (h :: t) := f h :: map' f t};
|
|
|
|
lst : List Nat;
|
|
lst := zero :: suc zero :: nil;
|
|
|
|
main : IO;
|
|
main := printNatLn (foldr (+) zero (map' ((+) (suc zero)) lst));
|
|
|
|
end;
|