Iteration


(for-each proc! lst)
Standard Higher-Order List Procedure. Apply proc! to each element of the given list. Called primarily for side effects.
(repeat i proc!)
Extended Scheme Procedure. Call proc! (a zero-parameter procedure, a.k.a., a “thunk”) i times.
(repeat i proc! val)
Extended Scheme Procedure. Evaluate (proc! val)i times.
(repeat i proc! v1 ... vn)
Extended Scheme Procedure. Evaluate (proc! v1 ... vn)i times.

Jerod Weinman

Copyright © 2007-2012 Janet Davis, Matthew Kluber, Samuel A. Rebelsky, and Jerod Weinman. (Selected materials copyright by John David Stone and Henry Walker and used by permission.)

This material is based upon work partially supported by the National Science Foundation under Grant No. CCLI-0633090. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License .