mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Added (string=?) family of functions
This commit is contained in:
parent
b2568e6e09
commit
f5bc6b0811
2 changed files with 13 additions and 2 deletions
1
TODO
1
TODO
|
@ -13,7 +13,6 @@ Working TODO list:
|
|||
|
||||
- need to change current*port functions to actually have a current port, and other i/o operations to use the correct current port
|
||||
- quasiquote - will need to enhance the parser to support a second type of quote, at minimum
|
||||
- string<? - and related functions, too
|
||||
- vectors - limited use in cgen module - make-vector, vector-set!, and vector-ref
|
||||
|
||||
- Reduction in size of generated code
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
char>?
|
||||
char<=?
|
||||
char>=?
|
||||
string=?
|
||||
string<?
|
||||
string<=?
|
||||
string>?
|
||||
string>=?
|
||||
foldl
|
||||
foldr
|
||||
not
|
||||
|
@ -66,7 +71,14 @@
|
|||
(define (char<=? c1 c2 . cs) (Cyc-bin-op-char <= c1 (cons c2 cs)))
|
||||
(define (char>=? c1 c2 . cs) (Cyc-bin-op-char >= c1 (cons c2 cs)))
|
||||
; TODO: char-ci predicates (in scheme/char library)
|
||||
; TODO: (define (string<? str1 str2 . strs)
|
||||
|
||||
|
||||
(define (string=? str1 str2) (equal? (string-cmp str1 str2) 0))
|
||||
(define (string<? str1 str2) (< (string-cmp str1 str2) 0))
|
||||
(define (string<=? str1 str2) (<= (string-cmp str1 str2) 0))
|
||||
(define (string>? str1 str2) (> (string-cmp str1 str2) 0))
|
||||
(define (string>=? str1 str2) (>= (string-cmp str1 str2) 0))
|
||||
; TODO: generalize to multiple arguments: (define (string<? str1 str2 . strs)
|
||||
|
||||
(define (foldl func accum lst)
|
||||
(if (null? lst)
|
||||
|
|
Loading…
Add table
Reference in a new issue