P. 1
haskell-98-tutorial

haskell-98-tutorial

|Views: 40|Likes:
Publicado porRiccardo Ricci
Haskell 98 Tutorial
Haskell 98 Tutorial

More info:

Published by: Riccardo Ricci on Oct 02, 2011
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/02/2011

pdf

text

original

The classes Eq and Ord have already been discussed. The definition of Ord in the Prelude is
somewhat more complex than the simplified version of Ord presented earlier. In particular, note
the compare method:
data Ordering
compare

EQ I LT I GT
Ord a =) a -) a -) Ordering
The compare method is sufficient to define all other methods (via defaults) in this class and is the
best way to create Ord instances.

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->