Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

recursive function scheme

(define (multiply x y)
  (* x y) 
)

(define (exponent x n)
  (define (expo n result)
  ( if(= n 0)
      result
      (expo (- n 1) (multiply result x))))
(expo n 1))


(display(exponent 2 4))
 
PREVIOUS NEXT
Tagged: #recursive #function #scheme
ADD COMMENT
Topic
Name
9+1 =