Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#lang racket
;; Import the math library for compile-time
;; Note: included in Racket v5.3.2
(require (for-syntax math))
;; In versions older than v5.3.2, just define the function
;; for compile-time
;;
;; (begin-for-syntax
;; (define (factorial n)
;; (if (zero? n)
;; 1
;; (factorial (- n 1)))))
;; define a macro that calls factorial at compile-time
(define-syntax (fact10 stx)
#`#,(factorial 10))
;; use the macro defined above
(fact10)