Principles of Reactive Programming. Homework 1. Solution