Coding Challenge: Working with Either and Pipe

Let's use Either and Pipe in a function in this coding challenge.

Problem statement

Given the two functions below, create a function called application that takes a single parameter, hour, of type number and uses pipe() to: Check whether the hour is valid using the checkValidHour function. Change valid hours to the proper greeting using the mapToGreeting function. Fall back to unknown greeting when the hour is invalid.

Try it yourself

Get hands-on with 1400+ tech skills courses.