<br><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 4:52 PM, Arseniy Alekseyev <span dir="ltr">&lt;<a href="mailto:arseniy.alekseyev@gmail.com">arseniy.alekseyev@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If your functions have the same type, then you can easily collect them<br>
in a data structure, say list, and fold that.<br>
<br>
For example:<br>
<br>
function :: String -&gt; (String -&gt; String)<br>
function &quot;f1&quot; = f1<br>
function &quot;f2&quot; = f2<br>
function &quot;f3&quot; = f3<br>
<br>
runAUserSpecifiedComposition :: String -&gt; F<br>
runAUserSpecifiedComposition = foldl (.) id . map function . words<br>
<br>
runAUserSpecifiedComposition &quot;f1 f2 f3&quot; should be equal to (f1 . f2 . f3) now.<br></blockquote><div><br>This is a nice one, looks already like tiny DSL )<br><br>I think I&#39;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.<br>
<br>Thanks everybody! <br>dokondr<br>  <br><br><br>
</div></div>