Source/Packages

Std.List

packages/foundation/standard/src/Std/List.alpha

317 lines21 declarations13.5 KiBSHA-256 0d04bb5f90d2

def · lines 130–141

stdListFold

Full file
Fold from the right: `stdListFold f z [a, b] = f a (f b z)`.
130def stdListFold =
131  (lambda erased element : Type 0 .
132    erased accumulator : Type 0 .
133    unrestricted step : (pi unrestricted value : element . unrestricted carried : accumulator . accumulator) .
134    unrestricted initial : accumulator .
135    unrestricted values : (family StdList element) .
136    eliminate
137      StdList
138      (lambda unrestricted current : (family StdList element) . accumulator)
139      values
140      (branch StdListEmpty . initial)
141      (branch StdListCons head tail induction . step head induction))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.