Welcome to the CHICKEN Scheme pasting service
fx ops Fibonacci added by DougT on Thu Jul 22 16:43:53 2021
;;; csc -O4 -block -lfa2 fib5B.scm 37 seconds (import (scheme time)) (import (chicken fixnum)) ;(: fib (fixnum -> fixnum)) (define fib (lambda (x) (if (fx<= x 1) x (+ (fib (fx- x 1)) (fib (fx- x 2)))))) (define (main) (let* ( [fibNum 45] [result (fib fibNum)] ) (display "(fib 45) = ") (display result) (newline) )) (let ( (start (current-jiffy)) ) (main) (display (- (current-jiffy) start) ) (display " ms elapsed time") (newline)) ~