Use pattern matching to solve same kata