[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Aw: Re: [sc-users] recursion
... but to be consequent: also col isn't needed anymore ...
~collatz_R = { |n, l = 1000|
n != 1 and: { l > 0 } if: {
~collatz_R valueArray: [n.even.if { n div: 2 } { n * 3 + 1 }, l - 1]
} add: n
}
Greetings
Daniel
-----------------------------
http://daniel-mayer.at
-----------------------------
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/