LOOPING CONSTRUCTS



BASIC LOOPING FORM

(loop <expr>...)

fsubr


GENERAL LOOPING FORM

(do (<binding>...) (<texpr> <rexpr>...) <expr>...)

(do* (<binding>...) (<texpr> <rexpr>...) <expr>...)

fsubr. do binds simultaneously, do* binds sequentially

where:

  • <texpr> the termination test expression
  • <rexpr> result expressions (the default is NIL)
  • <expr> the body of the loop (treated like an implicit prog)
  • returns the value of the last result expression

    LOOP THROUGH A LIST

    (dolist (<sym> <expr> [<rexpr>]) <expr>...)

    fsubr


    LOOP FROM ZERO TO N-1

    (dotimes (<sym> <expr> [<rexpr>]) <expr>...)

    fsubr


    XLISP-PLUS - Version 2.1g - Tom Almy tom.almy@tek.com - 18 JUL 94
    Generated with
    WebMaker