ensure that the start of next cut is after end of current cut
This commit is contained in:
parent
832580ea6a
commit
e5270ae588
@ -182,10 +182,10 @@
|
||||
(define (cl l acc)
|
||||
(if (null? l) (reverse acc)
|
||||
(cond ((end-of-cut? (cdar l))
|
||||
(cl (cddr l) (append (list (cons (caar l) (caadr l))) acc)))
|
||||
(cl (cddr l) (if (< (caar l) (caadr l)) (append (list (cons (caar l) (caadr l))) acc) acc)))
|
||||
(#t
|
||||
(cl (cdr l) acc)))))
|
||||
(if (start-of-cut? (cadar s))
|
||||
(if (and (start-of-cut? (cadar s)) (> (caar s) 0))
|
||||
(set! s (append '((0 0)) s)))
|
||||
(if (end-of-cut? (cadr (last s)))
|
||||
(set! s (append s (list (list (if (null? f) (greatest-fixnum) (caar f)) 1)))))
|
||||
|
Loading…
x
Reference in New Issue
Block a user