/usr/lib/s9fes/help/fold-right is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | S9fES (fold-right procedure object list ...) ==> object
Fold a set of lists by combining the result so far with adjacent
members of the given LISTs by PROCEDURE. PROCEDURE must by a K-ary
procedure where K is the number of lists passed to FOLD-RIGHT plus
one. OBJECT is the base element that is combined with the intermediate
result in the last application of PROCEDURE. FOLD-RIGHT folds lists
by grouping applications of PROCEDURE to the right.
Applications of FOLD-RIGHT can be rewritten as follows:
(fold-right p2 0 (a b)) == (p2 a (p2 b 0))
(fold-right p3 0 (a b) (c d)) == (p3 a c (p3 b d 0))
(fold-right p4 0 (a b) (c d) (e f)) == (p4 a c e (p4 b d f 0))
(fold-right cons 0 '(1 2 3)) ==> (1 2 3 . 0)
(fold-right list 0 '(1 2) '(3 4) '(5 6)) ==> (1 3 5 (2 4 6 0))
(fold-right + 0 '(1 2 3)) ==> 6
(fold-right - 0 '(1 2 3)) ==> 2 ; (- 1 (- 2 (- 3 0)))
|