Created simple functional pattern matching construct.

Please consider this contribution.
Why not return `Case<A, B>` here?