mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-17 09:28:40 +00:00
12 lines
323 B
Agda
12 lines
323 B
Agda
{-# OPTIONS --safe --warning=error --without-K #-}
|
|
|
|
open import LogicalFormulae
|
|
open import Functions
|
|
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)
|