Remove refresh-all from care-for-return

reimplement fill-up and cat
This commit is contained in:
mainzelm 2006-04-07 09:43:29 +00:00
parent 406aeafd2e
commit e69a69c2b2
1 changed files with 7 additions and 28 deletions

View File

@ -403,7 +403,6 @@
((#f) ;; konnte nichts machen
(values #t #f))
((#t) ;; etwas zugefügt oder entfernt
(refresh-all input-field)
(values #t #t))
(else
(values #t #f)))))
@ -819,7 +818,7 @@
y-edit-pos)
(list
(append
(reverse (cdr (reverse current-line)))
(drop-right current-line 1)
(list-ref edit-lines
(+ y-edit-pos 1))))
(drop edit-lines
@ -1542,35 +1541,15 @@
(define fill-up
(lambda (lst len elem)
(append lst
(let loop ((n (- len
(length lst))))
(if (< n 0)
'() ;'error--fill-up
(if (zero? n)
'()
(cons elem
(loop (- n 1)))))))))
(let* ((lst-len (length lst))
(needed (- len lst-len)))
(if (= needed 0)
lst
(append lst (make-list needed elem))))))
(define cat
(lambda (lst-lst)
(if (null? lst-lst)
'()
(append (car lst-lst)
(cat (cdr lst-lst))))))
(define split
(lambda (lst n)
(let loop ((fst '())
(scnd lst)
(n n))
(if (or (null? scnd)
(zero? n))
(values (reverse fst) scnd)
(loop (cons (car scnd)
fst)
(cdr scnd)
(- n 1))))))
(apply append lst-lst)))
(define remove
(lambda (lst pos)