singleton

alt text alt text alt text

Example

const rand = singleton(Math.random);
const first = rand.getInstance();
const second = rand.getInstance(); // first === second