Given two indices, I and K, the slice is the list containing the elements from and including the Ith element up to but not including the Kth element of the original list. Start counting the elements with 0.
Example
(deftest p18-slice (is (= '(d e f g) (slice 3 7 '(a b c d e f g h i j k)))))
No comments:
Post a Comment