term.
From: "Claus Reinke" <[EMAIL PROTECTED]>
To: "john lask" <[EMAIL PROTECTED]>
CC:
Subject: Re: [Haskell-cafe] RE: simple function: stack overflow in hugs
vsnonein ghc
Date: Mon, 24 Sep 2007 16:20:42 +0100
afraid not
the given example is too strict, the
Claus Reinke wrote:
the given example is too strict, the requirement is to generate the
matched portion lazilly, and return the tail (unconsumed portion).
ah yes, without optimisations, Prelude.span builds up stack,
I don't quite understand why it does so at all.
span p [] = ([],[])
afraid not
the given example is too strict, the requirement is to generate the matched
portion lazilly, and return the tail (unconsumed portion).
ah yes, without optimisations, Prelude.span builds up stack,
while the continuation-based alternative i mentioned is too
strict for some uses.
In p