@@ -412,19 +412,14 @@ Number of components of v less than v[s]
412
412
413
413
## Reversing Functions {#reversing-functions}
414
414
415
- Reversing allows to create a copy of array in which elements are in reverse
416
- order. For example, if ` v ` is declared as a real array of size 3, with values
415
+ Stan provides functions to create a new array by reversing the order of
416
+ elements in an existing array. For example, if ` v ` is declared as a real
417
+ array of size 3, with values
417
418
\[ \text{v} = (1,\, -10.3,\, 20.987), \] then
418
419
\[ \mathrm{reverse(v)} = (20.987,\, -10.3,\, 1). \]
419
420
420
- <!-- real []; reverse; (real [] v); -->
421
- \index{{\tt \bfseries reverse }!{\tt (real [ ] v): real [ ] }|hyperpage}
421
+ <!-- T []; reverse; (T [] v); -->
422
+ \index{{\tt \bfseries reverse }!{\tt (T [ ] v): T [ ] }|hyperpage}
422
423
423
- ` real[] ` ** ` reverse ` ** ` (real[] v) ` <br >\newline
424
- Create a copy of the array with the elements in reverse order.
425
-
426
- <!-- int[]; reverse; (int[] v); -->
427
- \index{{\tt \bfseries reverse }!{\tt (int[ ] v): int[ ] }|hyperpage}
428
-
429
- ` int[] ` ** ` reverse ` ** ` (int[] v) ` <br >\newline
430
- Create a copy of the array with the elements in reverse order.
424
+ ` T[] ` ** ` reverse ` ** ` (T[] v) ` <br >\newline
425
+ Return a new array containing the elements of the argument in reverse order.
0 commit comments