Support haskell style 'match' syntax with return value.