caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Array comprehensions?
@ 2007-11-08  0:06 Joel Reymont
  2007-11-08  4:02 ` [Caml-list] " Jon Harrop
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Reymont @ 2007-11-08  0:06 UTC (permalink / raw)
  To: caml-list List

Has anyone implemented array comprehensions in Camlp4?

	Thanks, Joel

--
http://wagerlabs.com




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Array comprehensions?
  2007-11-08  0:06 Array comprehensions? Joel Reymont
@ 2007-11-08  4:02 ` Jon Harrop
  2007-11-08  8:33   ` Joel Reymont
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Harrop @ 2007-11-08  4:02 UTC (permalink / raw)
  To: caml-list

On Thursday 08 November 2007 00:06, Joel Reymont wrote:
> Has anyone implemented array comprehensions in Camlp4?

Just curious, but what sort of comprehensions were you thinking of?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Array comprehensions?
  2007-11-08  4:02 ` [Caml-list] " Jon Harrop
@ 2007-11-08  8:33   ` Joel Reymont
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Reymont @ 2007-11-08  8:33 UTC (permalink / raw)
  To: Jon Harrop; +Cc: caml-list


On Nov 8, 2007, at 4:02 AM, Jon Harrop wrote:

> Just curious, but what sort of comprehensions were you thinking of?


This haskell-stype dot-product of two vectors:

dotp :: Num a => [:a:] -> [:a:] -> a
dotp xs ys = sumP [:x * y | x <- xs | y <- ys:]

--
http://wagerlabs.com





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-08  8:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-08  0:06 Array comprehensions? Joel Reymont
2007-11-08  4:02 ` [Caml-list] " Jon Harrop
2007-11-08  8:33   ` Joel Reymont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).