Updated functions section

* Added missing sample code
* Added section on functional programming
Merge pull request #22 from cndreisbach/fns

Updated functions section