Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Tree sort in Haskell

Name: Anonymous 2009-05-20 15:25


module TreeSort where
import Data.Set (toList, fromList)

treeSort :: Ord a => [a] -> [a]
treeSort = toList . fromList

Name: Anonymous 2009-05-20 15:41

>>3
Tree sort is good when the data is coming from a streaming source, like a file. You just add each item into the set until done, and it's already sorted (at least in tree form.)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List