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

Haskell Nomads

Name: Anonymous 2008-09-23 13:47

So can anybody tell me in a way one can understand it what a fucking monad does?

Name: Anonymous 2008-09-23 21:12

>>21
No matter what, you'd still have to instruct the Vagina class to use Penis' implementation
Why?
If that's what you wanted to do, that is.

Penis and Vagina could be defined in two completely unrelated files from two completely unrelated projects who happen to share a library that implements Stuff.
Okay?  Haskell could do that as well with typeclasses (oh man, I haven't used Haskell in months, excuse the made-up syntax):

[code]class Stuff x where
  fuck x = raise NotImplementedException

data Penis deriving (Stuff)
instance Stuff Penis where
  fuck x = "Oh"

data Vagina deriving (Stuff)
instance Stuff Penis where
  fuck x = "Ah"

fuck Penis # ==> "Oh"[code]

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