 
 DEFER: a''
 
-: b'' ( -- )
+: b'' ( a -- b )
     a'' ; inline recursive
 
-: a'' ( -- )
-    b'' a'' ; inline recursive
+: a'' ( a -- b )
+    dup [ b'' a'' ] when ; inline recursive
 
 [ t ] [
     [ a'' ] build-tree analyze-recursive
     \ a'' label-is-not-loop?
+] unit-test
+
+[ t ] [
+    [ a'' ] build-tree analyze-recursive
+    \ b'' label-is-loop?
+] unit-test
+
+[ t ] [
+    [ b'' ] build-tree analyze-recursive
+    \ a'' label-is-not-loop?
+] unit-test
+
+[ f ] [
+    [ b'' ] build-tree analyze-recursive
+    \ b'' label-is-not-loop?
 ] unit-test
 
 : loop-in-non-loop ( x quot: ( i -- ) -- )

    [ loop-test-3 ] build-tree analyze-recursive
    \ loop-test-3 label-is-not-loop?
] unit-test

: loop-test-4 ( a -- )
    dup [
        loop-test-4
    ] [
        drop
    ] if ; inline recursive

[ f ] [
    [ [ [ ] map ] map ] build-tree analyze-recursive

    build-tree analyze-recursive
    \ (each-integer) label-is-loop?
] unit-test

DEFER: a'''

: b''' ( -- )
    blah [ b''' ] [ a''' b''' ] if ; inline recursive

: a''' ( -- )
    blah [ b''' ] [ a''' ] if ; inline recursive

[ t ] [
    [ b''' ] build-tree analyze-recursive
    \ a''' label-is-loop?
] unit-test