Skip to main content
11 events
when toggle format what by license comment
Jun 5, 2014 at 20:32 comment added Felipe Nice! But I prefer my solution because it is really confusing: (+ 1 2) => 3; (+ 2 3) => 5; (+ 2 2 2) => 6 ; (+ 2 2) => 5
Jun 5, 2014 at 12:04 comment added Nick Russell @FelipeMicaroniLalli MIT-Scheme. (1+ x) => (+ x 1); (-1+ x) => (- x 1). You could replace mine with (define + (lambda (a b) (abs (- (- (- a) b) 1))))
Jun 4, 2014 at 19:39 comment added Felipe @Nick Russell, wth is -1+ ? :) I tried it on SISC and got this error: Error: undefined variable '|-1+|'.
Jun 4, 2014 at 8:36 comment added Hauleth @FelipeMicaroniLalli that adnotation was made after my answer so it doesn't count.
Jun 2, 2014 at 10:29 comment added Nick Russell Mine: (define + (lambda (a b) (abs (-1+ (- (- a) b)))))) (+ 2 2) => 5 (+ 3 4) => 8
Jun 2, 2014 at 4:42 comment added Felipe "Redefining 2+2 as 5 is not very creative! Don't doublethink it, try something else." --- Well, in R5RS I can redefine + instead 2+2 or 2. The answer is here: pastebin.com/KHtm9Jmv
May 31, 2014 at 4:00 comment added undergroundmonorail @JanDvorak I've never used lisp, but as I understand it it's something like ((((2))(()()))()()(()((((+))))()(((()(())((((2)))))()))(()))).
May 31, 2014 at 3:16 comment added Cole Tobin @JanDvorak Clearly, you're wrong then
May 30, 2014 at 18:33 comment added Hauleth So what? It seemingly add 2 to 2 as is in the task.
May 30, 2014 at 17:54 comment added John Dvorak hey! 2+2 isn't how you do addition in lisp!
May 30, 2014 at 17:50 history answered Hauleth CC BY-SA 3.0