git @ Cat's Eye Technologies Decoy / master eg / fold.scm
master

Tree @master (Download .tar.gz)

fold.scm @masterraw · history · blame

1
2
3
4
5
6
7
; SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
; For more information, please refer to <https://unlicense.org/>
; SPDX-License-Identifier: Unlicense

(import-from "stdenv" (+))
(import-from "list" (list fold))
(fold (lambda (x acc) (+ x acc)) 0 (list 4 16 1))