220 |
@end deffn |
@end deffn |
221 |
|
|
222 |
@deffn {Scheme Procedure} iota count [start step] |
@deffn {Scheme Procedure} iota count [start step] |
223 |
Return a list containing @var{count} elements, where each element is |
Return a list containing @var{count} numbers, starting from |
224 |
calculated as follows: |
@var{start} and adding @var{step} each time. The default @var{start} |
225 |
|
is 0, the default @var{step} is 1. For example, |
226 |
|
|
227 |
@var{start} + (@var{count} - 1) * @var{step} |
@example |
228 |
|
(iota 6) @result{} (0 1 2 3 4 5) |
229 |
|
(iota 4 2.5 -2) @result{} (2.5 0.5 -1.5 -3.5) |
230 |
|
@end example |
231 |
|
|
232 |
@var{start} defaults to 0 and @var{step} defaults to 1. |
This function takes its name from the corresponding primitive in the |
233 |
|
APL language. |
234 |
@end deffn |
@end deffn |
235 |
|
|
236 |
|
|