[Haskell-cafe] Function composition in run-time?

Ertugrul Soeylemez es at ertes.de
Wed Aug 24 15:36:52 CEST 2011

dokondr <dokondr at gmail.com> wrote:

> This is a nice one, looks already like tiny DSL )
> I think I've got the main idea - enumerate in my program all function
> compositions in some data structure for Haskell to compile, and the
> associate these with parameter values in external file.

In Haskell you get a not-even-too-tiny DSL for free for composing
functions in arbitrary, dynamic ways.  Hint:  (a ->) is a monad and (->)
is an ArrowChoice and an ArrowApply.


nightmare = unsafePerformIO (getWrongWife >>= sex)

More information about the Haskell-Cafe mailing list