Re: lifting functions to tuples?

2003-11-20 Thread Abraham Egnor
That only works for type constructors (or similar encapsulation functions), but not for any sort of a -> b functions, i.e. (+1). >How about this: > >liftTup :: (forall a. a -> f a) -> (x, y) -> (f x, f y) >liftTup f (x,y) = (f x, f y) > >Or ghc can infer the type if you write it like this: > >lift

Announce: SVMseq learning program

2003-11-20 Thread Hal Daume III
Hi all, FYI, I've had a Haskell implementation of a support vector machine learning algorithm around for a while and thought some people might find it interesting to look at/use. There are several advantages it has over SVM-Light; these are listed on the web page, but include sample selection

Re: lifting functions to tuples?

2003-11-20 Thread Duncan Coutts
On Tue, 2003-11-18 at 15:46, Abraham Egnor wrote: > The classic way to write a lift function for tuples is, of course: > > liftTup f (a, b) = (f a, f b) > > which has a type of (a -> b) -> (a, a) -> (b, b). I've been wondering if > it would be possible to write a function that doesn't require th