: dlist-pop-front ( dlist -- data )
dup dlist-empty? [ drop f ] [ (dlist-pop-front) ] ifte ;
+
+: (dlist-each) ( quot dnode -- )
+ [
+ [ dlist-node-data swap [ call ] keep ] keep
+ dlist-node-next (dlist-each)
+ ] [
+ drop
+ ] ifte* ;
+
+: dlist-each ( dlist quot -- )
+ swap dlist-first (dlist-each) ;
+
+: dlist-length ( dlist -- length )
+ 0 swap [ drop 1 + ] dlist-each ;
-! :folding=indent:collapseFolds=1:
-
! $Id$
!
-! Copyright (C) 2004 Mackenzie Straight.
+! Copyright (C) 2004, 2005 Mackenzie Straight.
!
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions are met:
: win32-io-thread ( -- )
10 wait-for-io swap [
- [ schedule-thread call ] callcc0
+ [ schedule-thread call ] callcc0 2drop
] [
drop yield
] ifte*