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

SICP

Name: Anonymous 2008-12-23 14:30

I'm now readin SICP.Its not a bad book at all.
Its notation however sucks:
(+ (* 3 (+ (* 2 4) (+ 3 5))) (+ (- 10 7) 6))
There is no way i could see which empty)( places contain which operators without reading entire string piece by piece.
This wouldn't work with larger strings.

Name: Anonymous 2008-12-23 15:06

>>12
MORE MORE MORE OPTIMIZED:
int abses[] = { 0, 1, ... };

int
abs(int i)
{
  if(i < 0)
    return (abses[-i]);
  else
    return (abses[i]);
}

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