maybe something like this?
(define foo
(let ((ini 10))
(new heap :of (list (new cycle :of 1 :for 3)
(new cycle :of -1 :for 6))
:for 1
:returning (lambda (i) (prog1 ini (incf ini i))))))
(loop repeat 10 collect (next foo #t))
=> ((10 9 8 7 6 5) (4 5 6) (7 6 5 4 3 2) (1 2 3) (4 5 6) (7 6 5 4 3
2) (1 0 -1 -2 -3 -4) (-5 -4 -3) (-2 -1 0) (1 0 -1 -2 -3 -4))
when i have
(new range
:initially 10
:stepping (new cycle :of (list (new cycle :of 1 :for 3)(new
cycle :of -1 :for 6)))
:for (new cycle :of '(3 6))))
then the period-length correlates with the down- and up-direction:
(next x t)
=> 10 11 12
=> 13 12 11 10 9 8
=> 7 8 9
etc.
but when i define
(new range
:initially 10
:stepping (new heap :of (list (new cycle :of 1 :for 3)(new
cycle :of -1 :for 6)))
)
i don't know how to get the same correlation.
i hope this was less abstruse..., johannes
_________________________
Johannes Quint
Rilkestr.55
D-53225 Bonn
0228 468256
[EMAIL PROTECTED]
http://www.johannes-quint.de
_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
_______________________________________________
Cmdist mailing list
[email protected]
http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist