Functional programming

Practical tips

https://www.youtube.com/watch?v=SlfipOW_ilU

1. Use functions over loops whenever possible.
2. Always return the same result given the same arguments. 
3. Write functions that do one thing.