1×
Become a member
to unlock all features
Autoplay

    Debug Functional Compositions with a Logging Side Effect in JavaScript

    javascriptJavaScript

    Functional compositions are purposely opaque, with no obvious way to "visualize" the data as it transforms. This is great when our function works, as it's hard to add bugs, but challenging when our compositions aren't correct. This lesson teaches you how to debug functional compositions by writing and using a trace() function to log out our values as they transform. This allows us to continue using pointfree programming while also providing a view into our compositions.