pub fn reverse(environment: &mut SloshVm, seq: Value) -> VMResult<Value>
Expand description
Usage: (reverse items)
Produce a vector that is the reverse of items.
Section: collection
Example: (let (tmap [1 2 3 0]) (test::assert-false (empty? tmap)) (set! tmap (reverse tmap)) (test::assert-equal 2 (get tmap 2)) (test::assert-equal 1 (get tmap 3)) (test::assert-equal 0 (get tmap 0)) (test::assert-error (reverse “string”)))