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

<> operator

Name: Anonymous 2007-07-14 8:37 ID:DWRQwZU8

discuss

Name: Anonymous 2007-07-14 9:54 ID:UFLFWkXQ


(<=>) :: (Ord a) => a -> a -> Bool
x <=> y | x > y = True
        | x == y = True
        | x < y = True

Also forced indentation of code.

Name: Anonymous 2007-07-14 10:53 ID:+wgZb7hK

>>5
_ <=> _ = True

Name: Anonymous 2007-07-14 11:11 ID:UFLFWkXQ

>>6
No, (<=>) is less than, equal to or more than.  It reduces to True only if one of these conditions is met, otherwise to False.  It obviously isn't irrefutable.

Name: Anonymous 2007-07-14 11:45 ID:CDlk9FEe

>>6

Not if you compare a normal floating point number with NaN

Name: Anonymous 2007-07-14 11:54 ID:Heaven

go do something useful fags

Name: Anonymous 2007-07-14 11:55 ID:Nf1D+OuX

Shit Compared To !=

Name: Anonymous 2007-07-14 12:07 ID:UFLFWkXQ

>>8
Stfu n00b.
Prelude> 32.3 <=> ((30932022.0^23209320323340920432)/(30932022.0^23209320323340920432))
True

Name: Anonymous 2007-07-14 12:51 ID:CDlk9FEe

>>11
(<=>) :: (Ord a) => a -> a -> Bool
x <=> y | x > y = True
        | x == y = True
        | x < y = True
    | otherwise = False


Prelude> 42 <=> (0/0)
False

Name: Anonymous 2007-07-14 12:54 ID:CDlk9FEe

(0/0) <=> (0/0)
[spoiler]False[/spoiler]

Name: Anonymous 2007-07-14 12:54 ID:CDlk9FEe

>>13

I AM NOT EXPERT BBCODER :-(

Name: Anonymous 2007-07-14 13:18 ID:wla4wQr3

You guys are not Enlightened enough:
a <=> b = flip any [(<), (==), (>)] (\ f -> f a b)

Unfortunately I haven't been able to make it pointless yet.

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