Hi, I found myself needing to quickly and effectively compute the median of an array of ordered elements (read as: I want to build a perfectly balanced kD-tree). Of course there was a nice imperative one, implemented for language "so-and-so" and "this-and-that" but I couldn't find a Haskell implementation. So I'd thought I'd give it a go. I used (Select by Floyd and Rivest):
http://portal.acm.org/citation.cfm?id=360694 wich is mainly targeted for Algol. It turns out that it works rather nice so I thought I'd post it here so that it could evolve even further (or be re-implemented), see attachment. /Andreas
Select.hs
Description: Binary data
_______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell