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

4chan memes the /prog/ way

Name: Anonymous 2007-02-01 17:48

First: No, I don't give a shit what you think.

if(!TITS){
GTFO();
}

Name: Anonymous 2007-02-02 16:11

main=return()>>= \ _ ->mapM_ putStr(repeat "DESU ")

Name: Anonymous 2007-02-02 16:17

>>21
That's a bit unnecessary.
main = (sequence_ (repeat (putStr "DESU ")))

Name: Anonymous 2007-02-02 16:18 (sage)

>>22
I happen to like function composition :x
main = (sequence_ . repeat . putStr) "DESU "

Name: Anonymous 2007-02-02 19:07

Those programs are good if you want infinitely many desus out on the terminal. However, if you're doing anything more complicated, chances are that you're going to just want a list of desus, out of which you can pick as many as you want.

desus = repeat "DESU"
delimit = (concat .) . intersperse

putStr $ delimit " " desus

Or, if you're into halting computations...

putStrLn $ delimit " " $ take 1000 desus

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