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

An EXPERT PROGRAMMER explains OO

Name: Anonymous 2008-03-19 11:50

Because I know you were all having so much trouble with this difficult concept.

http://theunixgeek.blogspot.com/2007/11/understanding-object-oriented.html

Name: Anonymous 2008-03-21 20:29

>>37
No, the putStrLn . show part transforms the list of numbers to a list of ()'s, printing a bunch of strings as a side effect. The return value is [(),(),(),()]. It's printed because ghci assumes that any non-() value is potentially interesting.
If that's not what you want, make sure that the return value is (), e.g. by using mapM (putStrLn . show) [1..4] >> return (). However, an EXPERT HASKELL PROGRAMMER would use library functions to his advantage and simply write mapM_ print [1..4] or even putStr . unlines . map show $ [1..4].

Name: Simon Peyote Joints 2008-03-21 21:13

>>41
I am a EXPERT HASKELL PROGRAMMER and agree whole-heartedly.

Name: Anonymous 2008-03-21 22:03

>>43
Same person and we have been trolled constantly.

Name: Anonymous 2008-03-22 5:45

>>32-42
GET THE FUCK BACK ON TOPIC OR I'LL REPORT YOU.

Name: Anonymous 2008-03-22 5:49

>>41
What does `_' in ``mapM_'' stand for?

Name: Simon Peyote Joints 2008-03-22 7:36

>>45
It stands for
8. Black hole register "_                               quote_
When writing to this register, nothing happens.  This can be used to delete
text without affecting the normal registers.  When reading from this register,
nothing is returned.  {not in Vi}

Name: Anonymous 2008-03-22 13:44

>>45
it means it's a version of mapM which doesn't return a useful value

Name: Anonymous 2008-03-22 14:54

>>45

It stands for _ _ _ (please use lazy evaluation / tail recursion).

Name: Anonymous 2008-03-22 15:09

>>45
mapM :: (Monad m) => (a -> m b) -> [a] -> m [b]
mapM_ :: (Monad m) => (a -> m b) -> [a] -> m ()

Name: Anonymous 2008-03-22 15:31

>>49
OK, I think I understand, but what is a Monad?

Name: Anonymous 2008-03-22 15:38

>>50
Monadic methods, also known as monads, are communities of people that move from one place to another, rather than settling down in one location. There are an estimated 30-40 million monads in the world. Many cultures have been traditionally monadic, but traditional monadic behavior is increasingly rare in industrialized countries. There are three kinds of monads, hunter-gatherers, pastoral monads, and peripatetic monads.

Name: Anonymous 2008-03-22 15:39

>>51
Ahh, that explains why virtually nobody knows how they work.

Name: Anonymous 2008-03-22 15:57

Hehe, Simon Peyote Joints.

Name: Anonymous 2008-03-22 15:57

>>53
Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.

Name: Anonymous 2008-03-22 15:57

>>54
WUT

Name: Anonymous 2008-03-22 16:17

>>55
is a Xarn Roll

Name: Anonymous 2008-03-22 16:29

Name: Anonymous 2008-03-22 17:02

>>2
The guy linked in the OP can't.
Everyone's complaining about how it's the wrong way to explain OO, but they're failing to notice that his explanation is wrong.

Name: Anonymous 2008-03-23 4:29

OO IN A NUTSHELL:

STRUCTS WITH METHODS

THAT IS ALL

Name: Anonymous 2008-03-23 5:50

>>59
Structs with data, methods, polymorphism, encapsulation.

Name: Anonymous 2008-03-23 6:41

>>60
All structs have data, and encapsulation is a natural result of having structs with methods.

Name: Anonymous 2008-03-23 6:48

Abstract data types != OOP.
>>59 is an EXPERT SEPPLES PROGRAMMER.

Name: Anonymous 2008-03-23 15:58

expert programmer explains typeglobs
http://www.youtube.com/watch?v=-8qzXWKN8lE

Name: Anonymous 2008-03-23 16:15

>>63
It's official: you must be totally wasted to write perl.

Name: Anonymous 2008-03-23 16:59

>>63
http://www.youtube.com/watch?v=94t2tTHZ25M
DIRRR basically gives you all the nams in the namspace

Name: Anonymous 2008-03-23 20:38

a way to make "I don't care" a good answer to the question "How does this work?"

Ignorance considered harmful and ultimately destructive.

Name: Anonymous 2008-03-24 4:00

>>66
That's why you've memorized the source of your whole standard library, right?

Name: Anonymous 2008-03-24 6:25

>>67
Not >>66 but I know how to implement any std c function and a large portion of the POSIX ones. what now bitch?

Name: Anonymous 2009-07-21 2:03


Resultinglist from yourmapM call Huh!

Name: Anonymous 2010-11-25 22:20

Name: Anonymous 2011-02-27 15:34

[/o]

Name: Anonymous 2011-02-27 15:36

Name: Anonymous 2011-02-27 15:40


Name: Anonymous 2011-02-27 15:42

Name: Anonymous 2011-02-27 15:44


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