Drop gratuitous abstraction
This commit is contained in:
parent
3fa52ef6e4
commit
bc8504fc27
|
@ -1,18 +1,15 @@
|
|||
(define (join-adjacent type? type-append list)
|
||||
(define (join-adjacent-strings list)
|
||||
(let loop ((new-list '()) (list list))
|
||||
(if (null? list) (reverse new-list)
|
||||
(loop (if (and (not (null? new-list))
|
||||
(type? (car new-list))
|
||||
(type? (car list)))
|
||||
(cons (type-append (car new-list)
|
||||
(car list))
|
||||
(string? (car new-list))
|
||||
(string? (car list)))
|
||||
(cons (string-append (car new-list)
|
||||
(car list))
|
||||
(cdr new-list))
|
||||
(cons (car list) new-list))
|
||||
(cdr list)))))
|
||||
|
||||
(define (join-adjacent-strings list)
|
||||
(join-adjacent string? string-append list))
|
||||
|
||||
(define (vector-refs vec . indexes)
|
||||
(let loop ((obj vec) (indexes indexes))
|
||||
(if (null? indexes) obj
|
||||
|
|
Loading…
Reference in New Issue