I am a beginner trying to learn functional programming.
Is there a way to pattern match different standard (not user defined) types?
E.g. if the argument of the function is a tuple, add them, if it is just an int, use int:
form (x, y) = x + y
form any_num = any_num
This obviously won't work, because the program thinks any_num is just any tuple and is therefore unreachable.
I guess you may do as follows;