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

Pages: 1-

SICP in Clojure

Name: Anonymous 2009-10-24 17:59

http://sicpinclojure.com/

Personally, I think this is a wonderful idea. SICP always needed more Java.

Name: ( ≖‿≖) 2009-10-24 18:06

Name: Anonymous 2009-10-24 22:28

It’s quite slow as well, since I have disabled all performance optimizations for development purposes.
LOLWHAT

Name: Anonymous 2009-10-25 0:08

>>2
This is horrible and you should feel kind of bad about it :(.

Name: Anonymous 2009-10-25 0:46

>>2
This ruined my day.

Name: Anonymous 2009-10-25 1:08

>>5
ヽ(´ー` )ノ THIS MADE MY DAY EPIC! ヽ(´ー` )ノ

Name: Anonymous 2009-10-25 6:15

>>3
Set up the site and install Drupal: Done

Name: Anonymous 2009-10-25 6:44

>>2
template <class Number> Number abs(Number x)
{
   if (x > 0)
       return x;
   else if (x == 0)
       return 0;
   else
       return -x;
}


...This programmer has not reached satori. I can't even properly express this in Sepples, but at the VERY least, the example should read:

template <class Number> Number abs(Number x) {
    if (x > 0)
        return x;
    if (x == 0)
        return 0;
    return -x;
}

Name: Anonymous 2009-10-25 7:19

>>8
faggots, all of you

template <class Number> Number abs(Number x) {
  return (x>=0)?x:-x;
}

Name: Anonymous 2009-10-25 7:39

>>9
Note that I said the example, it is an exercise from SICP. I didn't say that it was the best way to solve the problem (as it's clearly not).

Name: Anonymous 2009-10-25 10:54

>>8-9
For fuck's sake.
#include <stdlib.h>

Name: Anonymous 2009-10-25 13:01

( ≖‿≖) class SICPException (≖‿≖ )

Name: Anonymous 2009-10-25 13:37

>>2
holy shit why did I post this

Name: Anonymous 2009-10-25 13:43

>>9
oh hey I FV'ed your code for OMG OPTIMIZED performance
template<class T> T abs(T x){return x<0?-x:x;}

Name: Anonymous 2009-10-25 15:08

I optimized even further.
using std::abs;

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