Abelian sandpile model: Difference between revisions

Content deleted Content added
Brunjlar (talk | contribs)
m improved Forth solution
Brunjlar (talk | contribs)
m small Forth improvement
Line 94:
: row<SIZE over SIZE < ensure ;
: legal? col>=0 col<SIZE row>=0 row<SIZE 2drop true ;
: north swap1. 1d- swap ;
: east 1+ ;
: south swap1. 1d+ swap ;
: west 1- ;
: reduce peek 2dup ix dup -4 swap +! @ 4 < if dec-stack then ;