Error!
Success!

Patten Matching in C# 3.0

0
kicks

Patten Matching in C# 3.0  (Unpublished)

Pattern matching works best with built in facilities in the language, yet this was fun to implement. Basically a pattern matching statement(expression, computation) is of type Type1 => Type2 which means it get a value of type Type1 and returns a value of type Type2. We need a set of pairs of lambdas. Each pair consists of computations of type (Type1 => bool, Type1 => Type2). First item of this pair helps us to decide if we must execute the second part or not...


Kicked By:
Drop Kicked By: