22 lines
437 B
Plaintext
22 lines
437 B
Plaintext
(define-module math
|
|
:exports
|
|
(pi tau pow sqrt)
|
|
|
|
(define pi 3.1415)
|
|
(define tau (* 2 pi))
|
|
(define (pow a b) (** a b))
|
|
(define (sqrt a) (** a 0.5)))
|
|
|
|
(assert (= math::pi 3.1415))
|
|
(assert (= math::tau (* 2 math::pi)))
|
|
|
|
|
|
;; (tdefine-module 'math
|
|
;; :exports
|
|
;; '(pi tau pow sqrt)
|
|
|
|
;; '(define pi 3.1415)
|
|
;; '(define tau (* 2 pi))
|
|
;; '(define (pow a b) (** a b))
|
|
;; '(define (sqrt a) (** a 0.5)))
|