The built-in status of add1 and sub1
permits the implementation of a recursive process
to effect the math for “(+o, -o, *o)
BUT, when I “analyze” the “(/o, it appears that this entails
“using a fun to ‘code’ itself (DIVISION*) within itself,”
without the use of a reductive recursion per sub1.
(define /o
(lambda (x y)
(if (< x y)
0
(add1 (/o (- x y) y)))))
(print (/o 10 3))
;;ie. step#1 take the first y "out of" x, per (- x y)
2 take the rest of the y's out of x per (/ x y)
3 add 1 to the (remaining y's)
ie. adding 1 to x/(- x y) means add the 1st y
;;NB i'm not sure if this is not a "recursive" pattern
since, there is no sub1 recursion
;;[ [? is an '(if a form of recursion
and since the initial operation -> retVal
run fun until (< x y)
(+ (/ 7 3) 1) -> 3 ;;x still > y (7 > 3)
;;(+ (/ 3 3) 1) -> 2 ;;x still > y (3 > 2)
;;(+ (/ 2 3) 1) -> 0 ;;x now < y (2 < 3)
I was expecting “(/o to avoid implementing itself, and have recourse to the reductive recursion (sub1 y)