-
-
Notifications
You must be signed in to change notification settings - Fork 30
Generators
Arthur Guiot edited this page May 20, 2018
·
1 revision
const gen = t.collatz(10)
gen.next().value // 5
gen.next().value // 16
gen.next().value // 8
gen.next().value // 4
gen.next().value // 2
gen.next().value // 1
const gen = t.fibonacci()
gen.next().value // 0
gen.next().value // 1
gen.next().value // 1
gen.next().value // 2
...
const gen = t.sieve()
gen.next().value // 2
gen.next().value // 3
gen.next().value // 5
gen.next().value // 7
...
Any questions? Don't hesitate to create an issue and tell me about your problem 😊.
Copyright © 2017-2018 Arthur Guiot