Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 475 Bytes

File metadata and controls

25 lines (18 loc) · 475 Bytes

fromTo

Interview question of the issue #264 of rendezvous with cassidoo.

The Question

Write a function fromTo that produces a generator, that will produce values in a range.

Usage:

let gen = fromTo(5,7)

> gen()
5
> gen()
6
> gen()
7
> gen()
undefined

Installing & Running

Just pnpm i to install all dependencies and then pnpm t to run the tests!