From Imperative to Functional: how to make the leap.