The code has been moved to fun-little-utilities
Create functions that executes only once to get result
- ECMAScript 6 supports
This code should displays 10 lines of one number
var once = require('exec-once')
var randomOnce = once(Math.random)
for (let count = 10; count; --count) {
console.log(randomOnce())
}