MostlyAdequate / mostly-adequate-guide

Mostly adequate guide to FP (in javascript)
Other
23.44k stars 1.87k forks source link

Suggestion for a Practice exercise for Chapter 06: Example Application #562

Open DinMon opened 4 years ago

DinMon commented 4 years ago

One practice exercise that I thought of, was after the reader has written the composed function of medialUrls, is to get him/her to display the array of URLs to the console.

Below is a snippet of code of the solution of the exercise:

const displayUrls = compose(Impure.getJSON(compose(Impure.trace('image links'), mediaUrls)), url)
displayUrls('cats')