# Parameter and Return stack utilities

A collection of words for manipulating the parameter stack.

## API

dipdup ( a b -- a a b )
  Equivalent of "dip dup |" but faster and not involving RS.

dipswap ( a b c -- b a c )
  Equivalent of "dip swap |".

dipnip ( a b c -- b c )
  Equivalent of "dip nip |".

dipover ( a b c -- a b a c )
  Equivalent of "dip over |".

dig ( ... n -- ... val )
  Copy the nth value of PS to top of stack. "0 dig" is the equivalent of "dup",
  "1 dig", of "over".

ndrop ( ... n -- )
  Drop "n" elements from PS.

ps[] ( ... n -- ... a u )
  Yield the range represented by the "n" elements below "n" on PS. That address
  range is in PS itself. "u" will be the same as "n".

rs[] ( n -- a u )
  Same as ps[] but for RS. This range does not include the return address for
  the call to rs[].

roll ( ... n -- ... )
  Rotate n elements of the stack to the "left". "0 roll" is the equivalent of
  "swap", "1 roll" of "rot".

roll> ( ... n -- ... )
  Rotate n elements of the stack to the "right". "0 roll>" is the equivalent of
  "swap", "1 roll>" of "rot>".

rswap ( R: a b -- R: b a )
  Swap RS' top elements
