Next Previous Up Top Contents Index

2.6 The COMMON-EXTENSIONS module

iterate

Statement macro

Summary

Iterates over a body.

Macro call

iterate name ({argument [ = init-value ]}*)
[ body ]
end [ iterate ]

Arguments

name
A Dylan variable-namebnf.

argument
A Dylan variable-namebnf.

init-value
A Dylan expressionbnf.

body
A Dylan bodybnf.

Values

Zero or more instances of <object>.

Library

common-extensions

Module

common-extensions

Description

Defines a function that can be used to iterate over a body. It is similar to for, but allows you to control when iteration will occur.

It creates a function called name which will perform a single step of the iteration at a time; body can call name whenever it wants to iterate another step. The form evaluates by calling the new function with the initial values specified.


Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index