Add map-cons
This idiom of converting a list (L1 L2) of two lists into a list of cons cells was appearing in a few places, so add a function to encapsulate it.
This commit is contained in:
parent
80111fa2ec
commit
eb0f6c85cc
@ -115,6 +115,8 @@
|
|||||||
(dsv-splitter (delete "" (dsv-splitter s #\newline)) ffprobe-separator))
|
(dsv-splitter (delete "" (dsv-splitter s #\newline)) ffprobe-separator))
|
||||||
(define (k-v-parser s)
|
(define (k-v-parser s)
|
||||||
(read-from-string (dsv-splitter s #\=)))
|
(read-from-string (dsv-splitter s #\=)))
|
||||||
|
(define (map-cons l)
|
||||||
|
(apply (lambda(x y) (map cons x y)) l))
|
||||||
(define (make-dotted-alist s)
|
(define (make-dotted-alist s)
|
||||||
(cond ((and (list? s) (= 2 (length s)) (symbol? (car s)))
|
(cond ((and (list? s) (= 2 (length s)) (symbol? (car s)))
|
||||||
(cons (car s) (cadr s)))
|
(cons (car s) (cadr s)))
|
||||||
|
Loading…
Reference in New Issue
Block a user