Commit cf5332f6 authored by Andrew F. McKinney's avatar Andrew F. McKinney

Merge pull request #72 from halatmit/fix-error-message

fix error message for insert list item
parents 4cf576e2 fc06063c
......@@ -1787,14 +1787,14 @@ list, use the make-yail-list constructor with no arguments.
(format #f
"Insert list item: Attempt to insert item ~A into the list ~A. The maximum valid item number is ~A."
index2
(get-display-representation yail-list)
len+1)
(get-display-representation yail-list))
"List index too large"))
(let ((contents (yail-list-contents yail-list)))
(if (= index2 1)
(set-yail-list-contents! yail-list (cons item contents))
(let ((at-item (list-tail contents (- index2 2))))
(set-cdr! at-item (cons item (cdr at-item))))))))
(set-cdr! at-item (cons item (cdr at-item)))))))))
;; Extends list A by appending the elements of list B to it
;; Modifies list A
......
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