Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

thus spaketh jesus of nazareth

Name: Anonymous 2012-08-15 4:10

javascript programmers consistently score highest on IQ test
javascript programs are extremely fast, bug free, and please the User deeply
javascript is a combination of c and scheme, the 2nd and 3rd best languages
javascript is only for highly skilled programmers who understand asynchronous IO
javascript is the most powerful language ever created

Name: Anonymous 2012-08-18 2:29

why the fuck do you need tail call optimization?


def memo(fn):
    cache = {}
    def wrapper(*args):
        try:
            return cache[args]
        except:
            result = fn(*args)
            cache[args] = result
            return result
    return wrapper



@memo
def fib(n):
  if n < 2:
    return n
  else:
    return fib(n-1) + fib(n-2)


 memoize = function(func, hasher) {
    var memo = {};
    if (!hasher) hasher = function (niggar) {return niggar}
    return function() {
      var key = hasher.apply(this, arguments);
      return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
    };
  };


LEARN TO PROGRAM FAGGOT

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List