Welcome to my personal site, where I irregularly post technical notes, usually Emacs or Haskell-related. I am developer at Wix during the daytime, and developer at home before and after the daytime. When I am not writing code, I am either drinking wine or drinking tea (with these little cups). Cheese is my bread and tracking everything in Emacs is my cheese. So welcome!
They say functional programming has many essences and the composition is one of them. Thanks to the wonderful dot operator, we know how to compose functions like
a -> b and
b -> c to get a function
a -> c. But in some cases functions are not that simple and it becomes tricky to compose them nicely.
It would be lovely to express it in a more declarative way by abstracting away function application and result combination.
Apart from implementing combinators for predicate composition, we want to avoid any runtime penalty from using abstractions. In this article we are going to implement the following functions and investigate how far we can go with abstractions until performance degrades. Or maybe it won’t degrade. Who knows?