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