blob: 317674ee1fea36ecd504041bbbf33a5638dcc42c (
plain)
1
2
3
4
5
6
7
8
|
; P02 - Find the last two elements of a list.
(def a (list "a" "b" "c" "d"))
; slice takes the index (1-based) to begin
; and, optionally, the length of the slice
; (when missing, will grab until the end)
(print (->string (slice a (- (length a) 1))))
|