Exercises
Exercise 1. In 1989, John Hughes published a classic paper outlining some reasons for adopting FP. The 2 main reasons given in the paper are higher-order functions and lazy evaluation, both of which Hughes argued contribute to modularity. Read Hughes' paper here.
Exercise 2. In a 2015 follow-up to Hughes' paper, Zhenjiang Hu et al. reviewed the impact of FP with an emphasis on how it contributes to the correctness, structuring, and reasoning about computation. Read the paper by Hu et al. here.
Exercise 3. The papers by John Hughes and Zhenjiang Hu et al. were written for an academic audience and can be difficult to read/understand. Search online for articles that explain the reasoning for adopting FP, but written in a style you can appreciate. Here are some articles you might find interesting:
- Klint Finley, Functional programming is finally going mainstream
- Charles Scalfani, Why Functional Programming Should Be the Future of Software Development
- Cassidy Williams, Functional Programming 101
Exercise 4. James Sinclair wrote a series of blog posts about JavaScript FP. Browse through the various posts to see which ones catch your interest.
Exercise 5.
The npm module
functional-javascript-workshop
presents JavaScript FP in a workshop format. Each tutorial in the workshop
presents an FP concept, followed by a problem for you to solve in JavaScript FP.
Install and load the module. Use the workshop to consolidate your understanding
and working knowledge of JavaScript FP.