On Wed, Aug 24, 2011 at 4:52 PM, Arseniy Alekseyev < arseniy.alekse...@gmail.com> wrote:
> If your functions have the same type, then you can easily collect them > in a data structure, say list, and fold that. > > For example: > > function :: String -> (String -> String) > function "f1" = f1 > function "f2" = f2 > function "f3" = f3 > > runAUserSpecifiedComposition :: String -> F > runAUserSpecifiedComposition = foldl (.) id . map function . words > > runAUserSpecifiedComposition "f1 f2 f3" should be equal to (f1 . f2 . f3) > now. > 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. Thanks everybody! dokondr
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe