Implemented FILL and ERASE.
[forth.jl.git] / src / lib.4th
index 38a8d14..ad6a3a5 100644 (file)
         THEN
 ;
 
+( Fill u ints, starting at a, with the value b )
+: FILL          ( a u b -- )
+        -ROT OVER + SWAP ?DO
+                DUP I !
+        LOOP
+        DROP
+;
+
+: ERASE         ( a u -- )
+        0 FILL
+;
 
 ( PRINTING THE DICTIONARY ------------------------------------------------------ )