[Haskell-cafe] Function call by string

Donald Bruce Stewart dons at cse.unsw.edu.au
Sun Apr 8 06:05:17 EDT 2007

> 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 = ...

You'll need to implement a symbol table, I suspect. A Map is good
structure for this.

-- Don

More information about the Haskell-Cafe mailing list