Update @default to accept functions, adding @default unit tests