From: Chet Murthy <chet@watson.ibm.com>
To: caml-list@pauillac.inria.fr
Subject: Re: vector dot multiply
Date: Fri, 09 Jun 1995 07:50:06 -0400 [thread overview]
Message-ID: <9506091150.AA30307@lusitania.watson.ibm.com> (raw)
> >Also, is there a similar construct to Haskell array/list comprehensions?
>
> Bird and Wadler's book gives a simple translation scheme
> for list comprehensions to map+filter functions (pp63-64).
> This may meet your requirements.
That translation is wildly inefficient, too. There's a reason
that lazy languages, and pure languages, haven't caught on --
it's called efficiency. It's far more efficient to construct
a decent set of imperative classes (e.g. Rogue Wave Vector Classes)
than to try to import into CAML (which was, after all, designed
to (IMHO) not penalize the imperative code writer) the constructs of
intrinsically broken languages like Haskell.
>> ...
>> Also, is there a similar construct to Haskell array/list comprehensions?
>
>There is indeed one construct called streams.
Unfortunately, these streams are *not* the same as array/list comprehensions
-- they are "read-once", lazy, and impure. So they're far more suitable
for I/O, and other such things, than for implementing such comprehensions.
--chet--
next reply other threads:[~1995-06-09 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-06-09 11:50 Chet Murthy [this message]
1995-06-09 13:20 ` nikhil
-- strict thread matches above, loose matches on Subject: below --
1995-06-08 17:16 U-E59264-Osman Buyukisik
1995-06-08 18:29 ` Pierre Weis
1995-06-08 23:02 ` Ascander Suarez
1995-06-08 23:17 ` Bob Buckley
1995-06-09 7:29 ` Pascal Nicolas
1995-06-09 10:42 ` Judicael Courant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9506091150.AA30307@lusitania.watson.ibm.com \
--to=chet@watson.ibm.com \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox