https://twitter.github.io/scala_school/ru/pattern-matching-and-functional-composition.html