Changeset 37754 in project


Ignore:
Timestamp:
07/04/19 16:58:38 (4 months ago)
Author:
juergen
Message:

list-comprehensions docu updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/list-comprehensions

    r37753 r37754  
    4141<procedure>(repeat times x)</procedure>
    4242
    43 returns a unary procedure which repeats its only argument
    44 a number of times
     43produces a list of length times where all items are x
    4544
    4645==== iterate-times
     
    4948<procedure>(iterate-times fn times start)</procedure>
    5049
    51 returns a unary procedure which iterates the function fn
    52 on its only argument a number of times
     50produces a list of length times where the items are constructed by
     51successively applying fn to the last value, starting with start.
    5352
    5453==== iterate-while
     
    5756<procedure>(iterate-while fn ok? start)</procedure>
    5857
    59 returns a unary procedure which iterates the function fn
    60 on its only argument while the predicate ok? returns true
     58produces a list where the items are constructed by successively applying
     59fn to the last value, starting with start, as long as the value passes
     60the ok? test.
    6161
    6262==== iterate-until
     
    6565<procedure>(iterate-until fn ok? start)</procedure>
    6666
    67 returns a unary procedure which iterates the function fn
    68 on its only argument until the predicate ok? returns true
     67produces a list where the items are constructed by successively applying
     68fn to the last value, starting with start, until the value passes
     69the ok? test.
     70
    6971
    7072==== for
     
    7274</macro>(for item qualifier ....)</macro>
    7375
    74 where each qualifier is of the form (var lst fltr ...) whith
     76where item is an expression with variables to be bound in the
     77qualifiers.
     78Each qualifier is of the form (var lst fltr ...) whith
    7579
    7680* var a variable
Note: See TracChangeset for help on using the changeset viewer.