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

"Haskell is referentially transparent"

Name: Anonymous 2015-06-13 11:30

This means that functions really are mathematical functions, not horrible complex imperative procedures. So if x == y then f x == f y too. This allows us to use equational reasoning and math and the entirety of category theory as a resource to draw upon when programming

but thats wrong..

Prelude> let d x = 2*x :: Int
Prelude> minBound == maxBound
True
Prelude> d minBound == d maxBound
False

Name: Anonymous 2015-06-14 19:48

>>1
What the fuck are you doing you donkey?
λ> (minBound :: Int) == (maxBound :: Int)
False
λ> d minBound == d maxBound
False

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