Glynn Clements wrote:
Jyrinx wrote:
[...] and
the inability to handle exceptions (the actual exception won't occur
until after e.g. getContents has returned).
But how does this differ from strict I/O? I mean, say there's a disk
error in the middle of some big file I want to crunch
I'm tinkering with a little program I wrote a while back to generate
probability distributions and averages for rolling various kinds and
quanitities of dice and applying various rules (for instance, roll four
six-sided dice, drop the lowest, and add the other three). I'm trying to
optimize
As an experiment for a bigger project, I cooked up a simple program: It
asks for integers interactively, and after each input, it spits out the
running total. The wrinkle is that the function for calculating the
total should be a non-monadic stream function (that is, type [Integer]
- [Integer]
Remi Turk wrote:
On Sun, Dec 22, 2002 at 04:00:45AM -0800, Jyrinx wrote:
As an experiment for a bigger project, I cooked up a simple program: It
asks for integers interactively, and after each input, it spits out the
running total. The wrinkle is that the function for calculating the
total
Hal Daume III wrote:
BTW, I already found a major problem with the code I attached earlier,
using unsafeInterleaveIO: Run in GHCi (as I had done), it works fine;
but compiled by GHC and run as an executable, it waits for input and
*then* displays the prompt after the user hits Enter ... not
broken; should it be this?
http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.html
(Seems like the html is missing.)
Jyrinx
[EMAIL PROTECTED]
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman
broken; should it be this?
http://www.haskell.org/ghc/docs/latest/html/users_guide/release-5-04.html
(Seems like the html is missing.)
Jyrinx
[EMAIL PROTECTED]
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
Aha! Gotcha. Thanks for the explanation.
I suppose that, in general, for tail recursion to work right, the
accumulator has to be evaluated strictly (as is how my code was fixed)?
Jyrinx
[EMAIL PROTECTED]
On Tue, 2002-03-12 at 09:34, Hal Daume III wrote:
Here's the basic idea. Suppose we have
Hudak's book, but
it does everything lazily IIRC)
Jyrinx
[EMAIL PROTECTED]
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
commentary on my code
...)
Thanks!
Jyrinx
jyrinx_list at mindspring dot com
___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell
10 matches
Mail list logo