Make default value work as a function