parser
PatternMatching as in JS