[Haskell-beginners] module "static" data

Felipe Almeida Lessa felipe.lessa at gmail.com
Tue Jan 10 20:26:54 CET 2012

You could try something like

  fnLookupTable :: IO [(String, String -> Int)]
  fnLookupTable = do
    confA <- getConfigA
    confB <- getConfigB
    return [("a", moduleAFn confA)
            ("b", moduleBFn confB)]

Now you pass the result of fnLookupTable around.



More information about the Beginners mailing list