raganwald.github.com icon indicating copy to clipboard operation
raganwald.github.com copied to clipboard

Example in anamorphisms-in-javascript

Open selau642 opened this issue 4 years ago • 0 comments

function * downToOne(n) { for (let i = n; i > 0; --i) { yield i; } }

[...downToOne(5)]

//=> [ 1, 2, 3, 4, 5 ]

The array should be [5, 4, 3, 2, 1]

selau642 avatar Mar 07 '20 14:03 selau642