Commit 97a3674c authored by dave griffiths's avatar dave griffiths
Browse files

merge fixes

parent 494cb5e3
...@@ -67,8 +67,6 @@ ...@@ -67,8 +67,6 @@
((zero? i) (cons v (list-replace (cdr l) (- i 1) v))) ((zero? i) (cons v (list-replace (cdr l) (- i 1) v)))
(else (cons (car l) (list-replace (cdr l) (- i 1) v))))) (else (cons (car l) (list-replace (cdr l) (- i 1) v)))))
(define (choose l) (list-ref l (random (length l))))
(define (set-cons v l) (define (set-cons v l)
(if (list-contains? l v) (if (list-contains? l v)
l l
......
...@@ -159,7 +159,6 @@ ...@@ -159,7 +159,6 @@
;; (ktv "pack-id" "int" 1) ;; (ktv "pack-id" "int" 1)
;; (ktv "weight" "real" 10.4))) ;; (ktv "weight" "real" 10.4)))
(define (choose l) (list-ref l (random (length l))))
(define (random-string len) (define (random-string len)
(if (zero? len) (if (zero? len)
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
(when (not (equal? a b)) (when (not (equal? a b))
(error "unit " msg a b))) (error "unit " msg a b)))
(define (rndf)
(random))
(define (choose l) (list-ref l (random (length l))))
; ;
; -- procedure+: string-split STRING ; -- procedure+: string-split STRING
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment