[Haskell-beginners] How to correctly define data types?
Davi Santos
dps.abc at gmail.com
Tue Jul 19 23:41:28 CEST 2011
Ok, it seems a better.
thanks
Davi
To sort by distance to a given reference point you could use something
like
import Data.List (sortBy)
import Data.Ord (comparing)
...
sortedExamples = sortBy (comparing (distance referenceEx)) listExs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110719/f08a75ce/attachment.htm>
More information about the Beginners
mailing list