: ij-nbhood ( -- nbhood r: jy .. ix )
r> 0 j near do j near do
i j th@ + loop loop swap >r ;
: step ( -- ) hgt 0 do wid 0 do
i j th@ ij-nbhood over - rule
i j th! loop loop flip ;
: step ( -- ) hgt 0 do wid 0 do
i j th@ 0 j near do j near do
i j th@ + loop loop over - rule
i j th! loop loop flip ;
Honestly I'm torn. The extra name makes the body of the first `step` read more clearly but it does mean slightly more total noise. Otoh you could argue having them separate makes it clear the inner i j refers to different values. Which looks better to you anon?