Added `when`

If the first argument to `when` is logically true, or if the
first argument is a function and the result of calling it is
logically true, then `when` will return the value of the
second argument; otherwise it returns null.
Fixed thunk errors
Fixed a bug in `apply` and improved tests

`apply` always returned `undefined`, which seemed a tad wrong.
Fixed this and made sure the tests cover that case.
When calling `val` with a function, pass additional arguments

If `val` is called with a function, then any arguments past
the first will be passed along to the function.
Fixed indent messup

No idea where the tabs came from.