furnace.utilities: clean up

db4
Slava Pestov 2010-09-27 21:45:31 -07:00
parent 5b60d592c0
commit 18d4d01e48
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: namespaces make assocs sequences kernel classes splitting USING: namespaces make assocs sequences kernel classes splitting
words vocabs.loader accessors strings combinators arrays words vocabs.loader accessors strings combinators arrays
@ -27,10 +27,12 @@ ERROR: no-such-word name vocab ;
: each-responder ( quot -- ) : each-responder ( quot -- )
nested-responders swap each ; inline nested-responders swap each ; inline
: base-path ( string -- pair ) ERROR: no-such-responder responder ;
: base-path ( string -- seq )
dup responder-nesting get dup responder-nesting get
[ second class superclasses [ name>> = ] with any? ] with find nip [ second class superclasses [ name>> = ] with any? ] with find nip
[ first ] [ "No such responder: " swap append throw ] ?if ; [ first ] [ no-such-responder ] ?if ;
: resolve-base-path ( string -- string' ) : resolve-base-path ( string -- string' )
"$" ?head [ "$" ?head [