As a side note, (allowing seq and unsafePerformIO if necessary) is it
possible to implement a map that preserves cycles (instead of
transparently replacing them with infinite copies? Not horribly
useful, but would be quite cute.
Baltasar Trancon y Widemann gave a talk on a generalized
2009/7/1 Matthias Görgens matthias.goerg...@googlemail.com:
As a side note, (allowing seq and unsafePerformIO if necessary) is it
possible to implement a map that preserves cycles (instead of
transparently replacing them with infinite copies? Not horribly
useful, but would be quite cute.
Hi Andrew,
you will find it there but it's written in German.
http://opus.kobv.de/tuberlin/volltexte/2008/1755/
Regards,
Martin.
Andrew Hunter schrieb:
2009/7/1 Matthias Görgens matthias.goerg...@googlemail.com:
As a side note, (allowing seq and unsafePerformIO if necessary) is it
possible
you will find it there but it's written in German.
Yes. But at least there's an English abstract.
Matthias.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Mon, Jun 29, 2009 at 7:36 PM, Geoffrey
Marchantgeoffrey.march...@gmail.com wrote:
I think I can see the point of forcing a list without forcing the actual
data, but is there a way to do this that works on circular lists as well?
There can't be a way to do so that is pure, because such a
On Mon, Jun 29, 2009 at 11:30 PM, Ryan Ingramryani.s...@gmail.com wrote:
There can't be a way to do so that is pure, because such a function
could distinguish between
xs1 = () : xs1
and
xs2 = f () where f () = () : f ()
But doesn't seq and friends cause many of our normal referential
andrewhhunter:
On Mon, Jun 29, 2009 at 11:30 PM, Ryan Ingramryani.s...@gmail.com wrote:
There can't be a way to do so that is pure, because such a function
could distinguish between
xs1 = () : xs1
and
xs2 = f () where f () = () : f ()
But doesn't seq and friends cause many of our
seq allows you to distinguish (undefined) from (const undefined)
case allows you to distinguish (undefined) from the pair (undefined, undefined)
isFun f = f `seq` True
isPair p = case p of (_,_) - True
isFun undefined - undefined
isFun (const undefined) - True
isPair undefined - undefined
Tony Morris wrote:
Is there a canonical function for traversing the spine of a list?
I could use e.g. (seq . length) but this feels dirty, so I have foldl'
(const . const $ ()) () which still doesn't feel right. What's the
typical means of doing this?
(seq . length) doesn't sound that bad to
2009/6/29 Martijn van Steenbergen mart...@van.steenbergen.nl:
Tony Morris wrote:
Is there a canonical function for traversing the spine of a list?
I could use e.g. (seq . length) but this feels dirty, so I have foldl'
(const . const $ ()) () which still doesn't feel right. What's the
Deniz Dogan deniz.a.m.do...@gmail.com writes:
What is the spine of a list? Google seems to fail me on this one.
A (single-linked) list can be seen as a set of cons cells, where each
cell contains two pointers, one to the next cons cell, and one to the
cell's data contents ('car' and 'cdr' in
On Sun, Jun 28, 2009 at 10:05 PM, Tony Morristonymor...@gmail.com wrote:
Is there a canonical function for traversing the spine of a list?
I could use e.g. (seq . length) but this feels dirty, so I have foldl'
(const . const $ ()) () which still doesn't feel right. What's the
typical means of
I think I can see the point of forcing a list without forcing the actual
data, but is there a way to do this that works on circular lists as well?
On Mon, Jun 29, 2009 at 3:30 AM, Ketil Malde ke...@malde.org wrote:
Deniz Dogan deniz.a.m.do...@gmail.com writes:
What is the spine of a list?
Is there a canonical function for traversing the spine of a list?
I could use e.g. (seq . length) but this feels dirty, so I have foldl'
(const . const $ ()) () which still doesn't feel right. What's the
typical means of doing this?
--
Tony Morris
http://tmorris.net/
14 matches
Mail list logo