<br><br><div class="gmail_quote">On Wed, Aug 24, 2011 at 4:52 PM, Arseniy Alekseyev <span dir="ltr"><<a href="mailto:arseniy.alekseyev@gmail.com">arseniy.alekseyev@gmail.com</a>></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 -> (String -> String)<br>
function "f1" = f1<br>
function "f2" = f2<br>
function "f3" = f3<br>
<br>
runAUserSpecifiedComposition :: String -> F<br>
runAUserSpecifiedComposition = foldl (.) id . map function . words<br>
<br>
runAUserSpecifiedComposition "f1 f2 f3" 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'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>