Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion keyword parameters?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Cowan  
View profile  
 More options Jan 20 2008, 3:33 pm
From: "John Cowan" <johnwco...@gmail.com>
Date: Sun, 20 Jan 2008 15:33:38 -0500
Local: Sun, Jan 20 2008 3:33 pm
Subject: Re: keyword parameters?
On Jan 20, 2008 1:59 PM, Mark H. <mark.hoem...@gmail.com> wrote:

> On Jan 17, 7:40am, Rich Hickey <richhic...@gmail.com> wrote:
> > I've read Okasaki.

[snip]

> That's actually an interesting question -- how much optimization do
> typical SML/Haskell/Erlang compilers do on pattern matching?  But
> somehow I suspect that they won't get very far with the kind of
> matching code that does things like red-black trees.

Speaking of Okasaki and red-black trees, I just read his little paper
on them, and it's just amazing how he manages to reduce the normal
four rotations to a single transformation to be done if a newly
inserted node (colored red by default) has a red parent:

"Take the red child, the red parent, and the (black) grandparent and
locally balance these three nodes by making the smallest and largest
nodes children of the middle node. Then color the middle node red and
the other two nodes black. The middle node is linked back into the
tree in place of the former black grandparent."

If there is still a node with a red parent, then repeat the
transformation, and if you reach the root, color the root black
unconditionally (red nodes have to have black parents, so the root
can't be red).

See http://www.eecs.usma.edu/webs/people/okasaki/sigcse05.pdf , a
perfect gem which gives two pages to R/B trees and two to maxiphobic
heaps, an easier-to-understand alternative to leftist heaps.

--
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.