Paste: bad macro input
Author: | kobi |
Mode: | factor |
Date: | Mon, 19 Apr 2010 06:30:27 |
Plain Text |
TUPLE: position
{ x integer } { y integer } ;
TUPLE: chess-position < position
{ piece piece initial: f } ;
: [+|-] ( step ? -- [step+/-] )
[ + ] [ - ] ? curry ;
: right ( chess-position n -- chess-position )
over white? [+|-] change-x ;
: left ( position n -- position )
over white? not [+|-] change-x ;
Author: | kobi |
Mode: | factor |
Date: | Mon, 19 Apr 2010 07:32:33 |
Plain Text |
: [+|-] ( step ? -- [step+/-] )
[ + ] [ - ] ? curry [ call( x -- x' ) ] curry ; inline
New Annotation