MappingPackageInternalHacks1(A)

mappkg.spad line 1 [edit on github]

various Currying operations.

iter : (Mapping(A, A), NonNegativeInteger, A) -> A

iter(f, n, x) applies f n times to x.

recur : (Mapping(A, NonNegativeInteger, A), NonNegativeInteger, A) -> A

recur(g, n, x) is g(n, g(n-1, ..g(1, x)..)).