mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-06 20:38:40 +00:00
10 lines
273 B
Agda
10 lines
273 B
Agda
{-# OPTIONS --safe --warning=error --without-K #-}
|
|
|
|
open import Lists.Definition
|
|
|
|
module Lists.Fold.Fold {a b : _} {A : Set a} {B : Set b} where
|
|
|
|
fold : (f : A → B → B) → B → List A → B
|
|
fold f default [] = default
|
|
fold f default (x :: l) = f x (fold f default l)
|