I can understand how to create and think about the SKI and BCKW calculus, but I am never able to find practical uses. Maybe I am not looking deeply enough? That is, I wonder if (an example only please, I am not implying this is true) Java Servlets use S extensively and Python generators are an example of BCW and I am just unable to see through the forest of trees?
Share
In Haskell, they’re everywhere!
<$>flippureid<*>joinFrom a Haskell point of view,
<$>means “do in a context”.(+2) <$> (*3)means add two after multiplying by three.(+2) <$> [1,2,3]means add two to each element in the list.(+2) <$> (read . getLine)means add two to the number I just read.(+2) <$> someParsermeans add two to the number I just parsed.Things that have a context are called functors. All your Java/Python/C++ iterators are just weird inside-out versions of functors.
Another connection: the S and K combinator together are Turing-complete. In Haskell,
pureand<*>together form an applicative functor.Of course, understanding how the other combinators fit in will require learning Haskell. But this example shows how combinators are so entrenched in the language.