Go ProSign in

This Lesson is for Members

Subscribe today and get access to all lessons! Plus direct HD download for offline use, enhances transcripts, member comment forums, and iTunes "podcast" RSS feed. Level up your skills now!

Unlock This Lesson

Already subscribed? Sign In

Safer JavaScript with the Maybe Type

Safer JavaScript with the Maybe Type

Autoplay

    Make your own functions safer by lifting them into a Maybe context

    Andy Van SlaarsAndy Van Slaars
    2:07

    You probably have functions that aren’t equipped to accept a Maybe as an argument. And in most cases, altering functions to accept a specific container type isn’t desirable. You could use map, passing in your function, or you could “lift” your function into a Maybe context. In this lesson, we’ll look at how we can get a function that accepts raw values to work with our Maybe container without the need to modify the original function or the input values.

    You must be a Member to view code