AnyDice

reverse SEQUENCE

This function yields the SEQUENCE in reverse order.

Examples

output 1 @ {1..6}
output 1 @ [reverse {1..6}]

Do it yourself

function: reverse SEQUENCE:s{
 R: {}
 loop P over {1..#SEQUENCE}{
  R: {P@SEQUENCE, R}
 }
 result: R
}