[Haskell-cafe] Re: [Haskell] updating graphs non-destructively

2004-02-18 Thread Graham Klyne
[to Haskell-cafe] At 19:29 17/02/04 -0500, S. Alexander Jacobson wrote: Thank you for the link to FGL. I also looked at the boilerplate stuff. If *feels* like there should be a way to embed the graph stuff in the boilerplate stuff to allow non-destructive update of arbitrary object graphs

Re: [Haskell] updating graphs non-destructively

2004-02-17 Thread S. Alexander Jacobson
Thank you for the link to FGL. I also looked at the boilerplate stuff. If *feels* like there should be a way to embed the graph stuff in the boilerplate stuff to allow non-destructive update of arbitrary object graphs without handcoding the mapping of the datastructure to an object graph? Is

[Haskell] updating graphs non-destructively

2004-02-16 Thread S. Alexander Jacobson
In imperative languages, updating an object in a graph is an O(1) operation. However, non-destructive update appears to be O(n) with the size of the graph. For example, suppose we were to implement an auction system like eBay: --Data structures data Bid = Bid BidId Auction User Price

Re: [Haskell] updating graphs non-destructively

2004-02-16 Thread Tom Pledger
S. Alexander Jacobson wrote: In imperative languages, updating an object in a graph is an O(1) operation. However, non-destructive update appears to be O(n) with the size of the graph. For example, suppose we were to implement an auction system like eBay: [snip] One alternative is to store