racket/collects/schemeunit/scribblings/file.scm
2009-03-25 12:34:52 +00:00

14 lines
203 B
Scheme

#lang scheme/base
(define (my-+ a b)
(if (zero? a)
b
(my-+ (sub1 a) (add1 b))))
(define (my-* a b)
(if (zero? a)
b
(my-* (sub1 a) (my-+ b b))))
(provide my-+
my-*)