From 915bf0c449f83bc39747d687306295b1ac41ce18 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 23 Nov 2008 22:28:39 -0600 Subject: [PATCH] Fix walker with dip --- basis/tools/walker/walker.factor | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/basis/tools/walker/walker.factor b/basis/tools/walker/walker.factor index 9b2f5e4705..f1a1e3c873 100644 --- a/basis/tools/walker/walker.factor +++ b/basis/tools/walker/walker.factor @@ -109,25 +109,25 @@ SYMBOL: +stopped+ : change-frame ( continuation quot -- continuation' ) #! Applies quot to innermost call frame of the #! continuation. - >r clone r> [ - >r clone r> + [ clone ] dip [ + [ clone ] dip [ - >r - [ innermost-frame-scan 1+ ] - [ innermost-frame-quot ] bi - r> call + [ + [ innermost-frame-scan 1+ ] + [ innermost-frame-quot ] bi + ] dip call ] [ drop set-innermost-frame-quot ] [ drop ] 2tri ] curry change-call ; inline -: step-msg ( continuation -- continuation' ) +: step-msg ( continuation -- continuation' ) USE: io [ - 2dup nth \ break = [ - nip - ] [ - swap 1+ cut [ break ] swap 3append + 2dup length = [ nip [ break ] append ] [ + 2dup nth \ break = [ nip ] [ + swap 1+ cut [ break ] swap 3append + ] if ] if ] change-frame ;