mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-20 22:29:16 +02:00
48 lines
1.2 KiB
Scheme
48 lines
1.2 KiB
Scheme
(define *version* "0.0.1 (Pre-release)")
|
|
|
|
(define *version-banner*
|
|
(string-append "
|
|
:@
|
|
@@@
|
|
@@@@:
|
|
`@@@@@+
|
|
.@@@+@@@ Cyclone
|
|
@@ @@ An experimental Scheme compiler
|
|
,@ https://github.com/justinethier/cyclone
|
|
'@
|
|
.@
|
|
@@ #@ (c) 2014 Justin Ethier
|
|
`@@@#@@@. Version " *version* "
|
|
#@@@@@
|
|
+@@@+
|
|
@@#
|
|
`@.
|
|
|
|
"))
|
|
|
|
(define *c-file-header-comment*
|
|
(string-append "/**
|
|
** This file was automatically generated by the Cyclone scheme compiler
|
|
**
|
|
** (c) 2014 Justin Ethier
|
|
** Version " *version* "
|
|
**
|
|
**/
|
|
"))
|
|
|
|
;; Features implemented by this Scheme
|
|
(define *features* '(cyclone))
|
|
|
|
;; Based off corresponding SRFI-1 definition
|
|
(define (delete x lis)
|
|
(filter (lambda (y) (not (equal? x y))) lis))
|
|
|
|
;; Inefficient version based off code from SRFI-1
|
|
(define (delete-duplicates lis)
|
|
(define (recur lis) ; ((lis lis))
|
|
(if (null? lis) lis
|
|
(let* ((x (car lis))
|
|
(tail (cdr lis))
|
|
(new-tail (recur (delete x tail))))
|
|
(if (eq? tail new-tail) lis (cons x new-tail)))))
|
|
(recur lis))
|