Hacker News new | past | comments | ask | show | jobs | submit login

I really miss the simpler times of ES3/5.

    function memoize = function (fn) {
        var value
        return function() {
            return value !== undefined ? value : (value = fn())
        }
    }

    var func = memoize(someComputation)
Why would anyone want to write that do/iife abomination inline?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: