Check out a free preview of the full Functional-Light JavaScript, v3 course

The "Point Free Exercise" Lesson is part of the full, Functional-Light JavaScript, v3 course featured in this preview video. Here's what you'd learn in this lesson:

Kyle instructs students to refactor three given functions to be point-free.

Preview
Close

Transcript from the "Point Free Exercise" Lesson

[00:00:00]
>> Kyle Simpson: All right, let's do an exercise to practice these point free refactoring techniques. In this exercise, you've been given several different functions. The README will indicate three of them, the output function, the printIF function and the isLongEnough function. Those three functions you need to modify or refactor them to be defined point free.

[00:00:22]
So if you look in the exercise file, you'll see they're all at the top. You have the output function, the printIf function, and the isShortEnough function, I'm sorry, the isLongEnough function. Those are the three functions that you want to refactor to be point free using the techniques that we talked about.

[00:00:40]
There are listed in here a number of hints, and these are important for you to actually complete the exercise. So make sure you check out the hints in the README, they should help you with those three factorings. Your test cases essentially are that the first one should print hello, then nothing should be printed by the next two, and the last one should print Hello World.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now