Add support for passing a function as default

It is not uncommon to want to set a default value based upon a previous answer, by adding the ability to define default as a function this can be achieved.

I've added the relevant test.