This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/scheme/r6rs-comments.scm
Jean Abou Samra 801d2b24dd Scheme: support datum commented with #;
Previously, #; awaited an S-expression but could not cope with a
simple datum like a number literal. While at it, also support R6RS
brackets for S-expressions.
2022-02-08 16:36:49 +01:00

27 lines
373 B
Scheme

#!r6rs
#|
The FACT procedure computes the factorial
of a non-negative integer.
#| These comments can be nested too. |#
|#
(define fact
(lambda (n)
;; base case
(if (= n 0)
#;(= n 1)
#;(= n [1+ (eval '(n))])1
#;[= n (1+ [eval '[n]])];; another comment
#;1
; identity of *
(* n (fact (- n 1))))))