i know how to get the last element with the function last but is it possible to get the second to last element of a Sequence?
(defn last
[args]
(last args))
(last [1 2 3 4]) ;;--> 4 but i want it to return 3
>Solution :
(defn second-to-last [s]
(second (reverse s)))
(second-to-last (range 100))
=> 98
(defn second-to-last [s]
(first (take-last 2 s)))
(second-to-last (range 100))
=> 98