Sha256: 33889fea8d74f49803c8e98a628af18f3c58807c2f7849cabc8ae59380b0a35d

Contents?: true

Size: 241 Bytes

Versions: 5

Compression:

Stored size: 241 Bytes

Contents

#!r6rs

#|

   The FACT procedure computes the factorial

   of a non-negative integer.

|#

(define fact

  (lambda (n)

    ;; base case

    (if (= n 0)

        #;(= n 1)

        1       ; identity of *

        (* n (fact (- n 1))))))

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/pygments.rb-0.6.3/vendor/pygments-main/tests/examplefiles/r6rs-comments.scm
pygments.rb-0.6.3 vendor/pygments-main/tests/examplefiles/r6rs-comments.scm
pygments.rb-0.6.2 vendor/pygments-main/tests/examplefiles/r6rs-comments.scm
pygments.rb-0.6.1 vendor/pygments-main/tests/examplefiles/r6rs-comments.scm
pygments.rb-0.6.0 vendor/pygments-main/tests/examplefiles/r6rs-comments.scm