sequences.deep bug fix

db4
Daniel Ehrenberg 2007-12-27 21:03:12 -05:00
parent f536b4c057
commit c936895160
1 changed files with 4 additions and 5 deletions

View File

@ -5,11 +5,10 @@ IN: sequences.deep
! All traversal goes in postorder
GENERIC: branch? ( object -- ? )
M: sequence branch? drop t ;
M: string branch? drop f ;
M: number branch? drop f ;
M: object branch? drop f ;
: branch? ( object -- ? )
dup sequence? [
dup string? swap number? or not
] [ drop f ] if ;
: deep-each ( obj quot -- )
[ call ] 2keep over branch?