Chapter 2Factor

by Fred Daoud

One of my favorite programming techniques is function composition. Start with the input, pass it through a series of functions, with the output of one function being the input to the next function, and use the output of the last function as the final result. Each function is small and focused. You solve problems by creating and connecting blocks of code.

Function composition is the essence of Factor. Be aware that Factor is unlike any other language you’ve tried, and its paradigm might alter your mind. It will seem unorthodox, like Mr. Miyagi’s famous training regime for the Karate Kid. Just paint the fence, Reader-san, and give your mind a little time to acclimate. I promise it’s worth it.

Here’s a quick glimpse ...

Get Seven More Languages in Seven Weeks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.