Library function discovery (was: listProduct -- is this a standard function?)

2003-10-20 Thread Graham Klyne
At 16:38 17/10/03 -0700, Brandon Michael Moore wrote: The suggestion of a types that specialize to/unify with this type search would be really useful. My main interest in Haskell is as a scripting language for semantic web applications (cf [1] et seq). Your comment suggests a possible

Re: listProduct -- is this a standard function?

2003-10-17 Thread Brandon Michael Moore
I'm pretty sure this is sequence. Brandon ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

listProduct -- is this a standard function?

2003-10-15 Thread Graham Klyne
I've constructed a listProduct function that I think I've seen somewhere else... is it a standard function? If so, where is it defined? My code is: [[ -- |Given a list of lists, construct a new list of lists where -- each member of the new list is the same length as the original -- list, and

Re: listProduct -- is this a standard function?

2003-10-15 Thread Derek Elkins
On Wed, 15 Oct 2003 17:07:00 +0100 Graham Klyne [EMAIL PROTECTED] wrote: [[ lp [] = [[]] lp (as:ass) = concatMap (\a - (map (a:) (lp ass))) as ]] I think I should also be able to eliminate the lambda-abstraction, but I can't see how. I prefer the list comprehension, as I find that

Re: listProduct -- is this a standard function?

2003-10-15 Thread Matt Harden
On Wednesday 15 October 2003 11:07 am, Graham Klyne wrote: I've constructed a listProduct function that I think I've seen somewhere else... is it a standard function? If so, where is it defined? Yes. It's called sequence. It's defined in the prelude. It works with arbitrary monads, not just