On Sat, Mar 28, 2009 at 3:03 AM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
What about using a custom list type, that has only one constructor like
(:), that is, a type for infinite lists?
You mean
Data.Stream?http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Stream
On Thu, 26 Mar 2009, wren ng thornton wrote:
Thomas Hartman wrote:
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
output at each step of recursion, which a consumer can than crunch in
a lazy way?
It has
On Fri, Mar 27, 2009 at 7:03 PM, Henning Thielemann
lemm...@henning-thielemann.de wrote:
On Thu, 26 Mar 2009, wren ng thornton wrote:
Thomas Hartman wrote:
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
Hi guys,
I tried for days now to figure out a solution that Luke Palmer has
presented me with, by myself, I'm getting nowhere.
He has kindly provided me with this code:
import Data.Monoid
newtype IntTrie a = IntTrie [a]
deriving Show
singleton :: (Monoid a) = Int - a - IntTrie a
On Thu, Mar 26, 2009 at 12:21 PM, GüŸnther Schmidt gue.schm...@web.dewrote:
Hi guys,
I tried for days now to figure out a solution that Luke Palmer has
presented me with, by myself, I'm getting nowhere.
Sorry, I meant to respond earlier.
They say you don't really understand something until
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
output at each step of recursion, which a consumer can than crunch in
a lazy way?
I find that coinduction seems to figure frequently in algos that
process a stream.
Re that link: search for wren's comments containing it is however
nicely coinductive
2009/3/26 Thomas Hartman tphya...@gmail.com:
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
output at each step of
Thomas Hartman wrote:
Luke, does your explanation to Guenther have anything to do with
coinduction? -- the property that a producer gives a little bit of
output at each step of recursion, which a consumer can than crunch in
a lazy way?
It has more to do with tying the knot (using laziness to
2009/3/26 Luke Palmer lrpal...@gmail.com:
The spine of this trie is maximally lazy: this is key. If the structure of
the spine depended on the input data (as it does for Data.Map), then we
wouldn't be able to process infinite data, because we can never get it all.
So even making a trie out of