Collaborating with your computer using typed holes!
Vaibhav Sagar (@vbhvsgr)
A placeholder for an expression with a known type and an unknown value.
They allow the programming language to help us write programs!
>>> def map(f, ls): return []
>>> def map(f, ls): [f(e) for e in ls] ... >>> plusOne = lambda i: i + 1 >>> print(map(plusOne, [1, 2, 3])) None
>>> def map(f, ls): return (f(e) for e in ls) ... >>> print(map(plusOne, [1, 2, 3])) <generator object map.<locals>.<genexpr> at 0x7ffb92103ca8>
>>> def map(f, ls): ... print("Where are your tests now?") ... return [2, 3, 4] ... >>> map(plusOne, [1, 2, 3]) == [2, 3, 4] Where are your tests now? True