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

You Need to Read Your SICP Today

Name: Anonymous 2009-03-05 12:45

In my systems programming class we all had to write a simple unix utility in C to read and display students' questions for our weekly quiz.  The student who wrote the most secure and elegant solution was awarded tons of extra credit.  Guess who won?  That's right, the guy who built abstractions from procedures.  The guy who used a cons list to input his questions.  The guy who read his FUQIN SICP.

I was completely blown away at how elegant and easy to understand his code was.  It made my code look like barf.  It made my code look like it was written in some bizarre dialect of a tribe of autistic pigmies. And it made me sort of embarrassed that I haven't read my SICP yet.

So to all of you out there who think that Scheme is just some toy language, take heed.

Name: Anonymous 2013-06-09 21:22

val wat = List(1, 2)
def wot(x: Int) = x + 1
def wut(x: Int) = List(x + 1, x + 2)

wat.map(wot) // List(2, 3) // totally legit
wat.map(wut) // List(List(2, 3), List(3, 4)) // wtf is this
wat.flatMap(wut) // List(2, 3, 3, 4) // omfg

Guys I just understood Monads.

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