Paste: Failing tuple code

Author: Paul Moore
Mode: factor
Date: Fri, 16 Jan 2009 21:45:56
Plain Text |
SINGLETON: fail
TUPLE: vm target pc position stack captures ;

: Char ( vm c -- vm )
  over
  [ [ position>> ] [ target>> ] bi nth = ]
  [ dup [ [ 1 + ] change-pc ] [ [ 1 + ] change-position ] bi ]
  [ dup fail >>pc ]
  if
;

New Annotation

Summary:
Author:
Mode:
Body: