[Haskell-cafe] Sorting Integers

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon Feb 13 06:37:04 EST 2006

> I have 3 integers, a b c that I want to pass to a function, and I want the
> function to return the 3 integers sorted, from largest to smallest - any
> idea how to do this?

    Prelude> let sort3 x y z = List.sort [x,y,z]
    Prelude> sort3 8 2 0


More information about the Haskell-Cafe mailing list