hello, > Is it possible to have a function accept variable number of > arguments, such that 'f' can be instantiated to different > concrete types as > > f :: Applicative a => (e1 -> f) -> a e1 -> A f > f g a = pure g <*> a > > f :: Applicative a => (e1 -> e2 -> f) -> a e1 -> a e2 -> A f > f g a b = pure g <*> a <*> b
f is just a left fold over the list of arguments. I've written about such things here: http://paczesiowa.blogspot.com/2010/03/generalized-zipwithn.html regards, Bartek Ćwikłowski _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
