MappingPackageInternalHacks1 AΒΆ

mappkg.spad line 1

various Currying operations.

iter: (A -> A, NonNegativeInteger, A) -> A
iter(f, n, x) applies f n times to x.
recur: ((NonNegativeInteger, A) -> A, NonNegativeInteger, A) -> A
recur(g, n, x) is g(n, g(n-1, ..g(1, x)..)).