[Haskell-cafe] Function call by string

Lennart Augustsson lennart at augustsson.net
Sun Apr 8 06:06:46 EDT 2007

In general, you can't do that.  You can only do it if you restrict  
the functions that can be called somehow, e.g., by having a list of  
callable functions and their names.

Why do you want to do this?  Perhaps there is a more Haskelly  
solution to your problem.

	-- Lennart

On Apr 8, 2007, at 11:01 , Philipp Volgger wrote:

> Hello everybody!
> Can me somebody say how I can call a function by string? Thus I  
> want to have a function that has as argument a string (name of a  
> function to call) and then tries to call that function, a kind of:
> functionCall :: String -> [String] -> RetVal
> functionCall functionName arguments = ...
> Thanks
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list