fold1

one of the documented procedures in this installation of the ACS
Usage:
fold1   f   xs
What it does:
takes a binary function f and a list {x1 x2 x3 ...} and returns (...(f (f (f x1 x2) x3) x4)...)
Defined in: /web/philip/tcl/ad-functional.tcl

Source code:


    if { [null_p $xs] } {
	error "ERROR: fold1 is undefined for empty lists."
    } else { 
	fold $f [head $xs] [tail $xs]
    }


philg@mit.edu