Hi,

I have the following code:

--------------------------------------------------------------------------------
fs g = (g fst, g snd)
examples = (fs fmap, fs liftA, fs liftM, fs id, fs ($(1,"2")), fs
((,)id), fs (:[]), fs repeat)
--------------------------------------------------------------------------------

The idea is that fs accepts a polymorphic function as its argument.
What type signature can I specify for f in order to compile this code?
If it is not possible in Haskell, is there another language with
static typing which allows this?

Thanks,
Vladimir
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to