vedenza
August 29, 2009
>>> def pair(x, y): return lambda f: f(x,y)
...
>>> def first(z): return z(lambda x, y: x)
...
>>> def second(z): return z(lambda x, y: y)
...
>>> t = pair('foo', 'bar')
>>> first(t)
'foo'
>>> second(t)
'bar'
>>>
shamelessly copied and ported from scheme
Leaking abstractions
May 12, 2009
x[:] : x[::-1] = x[1:-1] : x[len(x)-2:0:-1]
Tertium datur
September 17, 2008
if (a) {
[...]
}
else if (!a) {
[...]
}
else {
[...]
}
HTTP Errors Explained
May 28, 2008
Lesson 1: Error 404 is clearly illustrated here.
Understanding recursion, part 2
April 23, 2008
Recursion is not always direct, it can also be mutual.
Understanding recursion
April 23, 2008
In order to understand recursion, one must first understand recursion.