furnace.utilities: clean up
parent
5b60d592c0
commit
18d4d01e48
|
@ -1,4 +1,4 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! Copyright (C) 2008, 2010 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: namespaces make assocs sequences kernel classes splitting
|
||||
words vocabs.loader accessors strings combinators arrays
|
||||
|
@ -27,10 +27,12 @@ ERROR: no-such-word name vocab ;
|
|||
: each-responder ( quot -- )
|
||||
nested-responders swap each ; inline
|
||||
|
||||
: base-path ( string -- pair )
|
||||
ERROR: no-such-responder responder ;
|
||||
|
||||
: base-path ( string -- seq )
|
||||
dup responder-nesting get
|
||||
[ 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' )
|
||||
"$" ?head [
|
||||
|
|
Loading…
Reference in New Issue