Implementing count_some_var function
Implementing check_pat function
Implementing match function
Implementing first_match function
Fixing bug in check_pat function.
Missing processing of inner patter in ConstructorP