mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-20 06:09:17 +02:00
Initial file
This commit is contained in:
parent
dc77270d8f
commit
a409db4e84
1 changed files with 30 additions and 0 deletions
30
scheme/complex.sld
Normal file
30
scheme/complex.sld
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
;;;; Cyclone Scheme
|
||||||
|
;;;; https://github.com/justinethier/cyclone
|
||||||
|
;;;;
|
||||||
|
;;;; Copyright (c) 2014-2016, Justin Ethier
|
||||||
|
;;;; All rights reserved.
|
||||||
|
;;;;
|
||||||
|
;;;; This module contains the complex library from r7rs.
|
||||||
|
;;;;
|
||||||
|
(define-library (scheme complex)
|
||||||
|
(export
|
||||||
|
angle
|
||||||
|
imag-part
|
||||||
|
magnitude
|
||||||
|
make-polar
|
||||||
|
make-rectangular
|
||||||
|
real-part
|
||||||
|
)
|
||||||
|
(import (scheme base))
|
||||||
|
(begin
|
||||||
|
(define (real-part x) x)
|
||||||
|
(define (imag-part x) 0)
|
||||||
|
(define (angle z)
|
||||||
|
(error "Complex numbers are not supported at this time"))
|
||||||
|
(define (magnitude z)
|
||||||
|
(error "Complex numbers are not supported at this time"))
|
||||||
|
(define (make-rectangular x y)
|
||||||
|
(error "Complex numbers are not supported at this time"))
|
||||||
|
(define (make-polar x y)
|
||||||
|
(error "Complex numbers are not supported at this time"))
|
||||||
|
))
|
Loading…
Add table
Reference in a new issue