Skip to content

Commit

Permalink
Update ajacks41-inlining-unrolling.lisp
Browse files Browse the repository at this point in the history
  • Loading branch information
alejack312 authored Dec 5, 2024
1 parent 140c430 commit a1adae8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions benchmarks/ajacks41-inlining-unrolling.lisp
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
(define (add_pair_elements p) (+ (left p) (right p)))
(define (sum n acc) (if (= n 0) acc (sum (sub1 n) (+ acc n))))
(print (+ (add_pair_elements (pair 5 5)) (sum 3 0)))
(define (pairadd p) (+ (left p) (right p)))
(define (sum n acc)
(if (= n 0)
acc
(sum (- n 1) (+ acc n))))
(print (+ (pairadd (pair 5 5)) (sum 3 0)))

0 comments on commit a1adae8

Please sign in to comment.