diff --git a/src/boot/boot.janet b/src/boot/boot.janet index a96a0eff..f206b990 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -909,9 +909,14 @@ (get x 0)) (defn last - "Get the last element from an indexed data structure." - [xs] - (get xs (- (length xs) 1))) + `` + Get the final element from `x`. + + `x` can be a bytes, indexed, or abstract type value with suitable + `get` and `length` methods. + `` + [x] + (get x (- (length x) 1))) ## Polymorphic comparisons