butlast returns a sequence containing every element of a collection except its last element. It accepts sequential, seqable input or nil, and returns nil when no element remains. section 10.1
Removing the final element
(butlast '(0 1 2 3)) ;; (0 1 2) (butlast nil) ;; nil (butlast []) ;; nil
Like the neighboring sequence-processing functions, butlast generates a lazy sequence and composes naturally with sequence transformations. section 10.1
