allow function type for choices

fixes #9