\ 4tH library - ROLL/PICK (CORE EXT) - Copyright 2003,2004 J.L. Bezemer \ You can redistribute this file and/or modify it under \ the terms of the GNU General Public License [UNDEFINED] ROLL [IF] DEFER TURN : (ROLL) ; : (PICK) OVER SWAP ; : DIG IS TURN DUP BEGIN DUP WHILE ROT >R 1- REPEAT DROP TURN BEGIN DUP WHILE R> -ROT 1- REPEAT DROP ; : ROLL ['] (ROLL) DIG ; ( nx n2 n1 n0 x -- n2 n1 n0 nx) : PICK ['] (PICK) DIG ; ( nx n2 n1 n0 x -- nx n2 n1 n0 nx) [DEFINED] 4TH# [IF] hide TURN hide (ROLL) hide (PICK) hide DIG [THEN] [THEN]