]> gitweb.factorcode.org Git - factor.git/commitdiff
prettyprint: adding a datastack. word
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 4 Feb 2022 23:23:30 +0000 (15:23 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 4 Feb 2022 23:23:30 +0000 (15:23 -0800)
since we use this in a few places

basis/prettyprint/prettyprint.factor

index 5e87cb859c23be4748c8bd22d92913942c1bfe1f..1952edd6e049911c0d7e01d961659d4a99bb2e35 100644 (file)
@@ -40,6 +40,9 @@ IN: prettyprint
 
 : stack. ( seq -- ) [ short. ] each ;
 
+: datastack. ( seq -- )
+    [ nl "--- Data stack:" print stack. ] unless-empty ;
+
 : .s ( -- ) get-datastack stack. ;
 : .r ( -- ) get-retainstack stack. ;