This is an old version, view current version.
5.6 Reversing functions
Stan provides functions to create a new array by reversing the order of
elements in an existing array. For example, if v
is declared as a real
array of size 3, with values
v=(1,−10.3,20.987), then
reverse(v)=(20.987,−10.3,1).
array[] T
reverse
(array[] T v)
Return a new array containing the elements of the argument in reverse order.
Available since 2.23