Return an initial portion of a list
Download (right click, save as, rename as appropriate)
1 2 3 4
; Returns the first `k' elements of `li' or, if `k' is negative, all but the ; last "(- k)" elements (define (list-head li k) (reverse (list-tail (reverse li) (if (< k 0) (- k) (- (length li) k)))))