Refactor and add new calling style

Instead of requiring an anonymous function with typed arguments, allow the types
to be supplied as a second array. This should make it easier to write code that
checks a property of a generic function that takes multiple types.
Clearer argument names and small bugfix
doc: Add documentation