Returns elements from either end of a sequence. If k >= 0 return a new sequence consisting of the first k elements of seq, otherwise return a new sequence consisting of the last k elements of seq. For example:
take(#(0, 5, 10, 15, 20, 25, 30), 5) ⇒ #(0, 5, 10, 15, 20, 25)
take(#(0, 3, 6, 9, 12, 15, 18), -3) ⇒ #(12, 15, 18)
open
| seq | An instance of <sequence>. |
| k | An instance of <integer>. |
| new-sequence | An instance of <sequence>. |