Solution using ES6 to create closuses

Using ES6 arrows, it's possible to make an extremely short implementation.