Paste: slist with sentinel -> sequence
Author: | Erich Ocean |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:18:50 |
Plain Text |
TUPLE: entity < identity-tuple id attribute ;
TUPLE: edge < entity parent start-pvertex end-pvertex geometry ;
TUPLE: pvertex < entity next-pvertex parent vertex ;
: edge-pvertices ( edge - pvertices )
{ [ start-pvertex>> ] [ end-pvertex>> ] bi [ 2dup eq? not ] [ over next-pvertex>> swap ] while }
Author: | Erich Ocean |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:22:00 |
Plain Text |
: edge-pvertices ( edge - pvertices )
{ [ start-pvertex>> ] [ end-pvertex>> ] bi [ 2dup eq? not ] [ over next-pvertex>> swap ] while drop }
Author: | mrjbq7 |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:26:55 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[ start-pvertex>> ] [ end-pvertex>> ] bi
[ 2dup eq? not ] [ [ next-pvertex>> ] dip ] while drop ;
Author: | mrjbq7 |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:27:53 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[ start-pvertex>> ] [ end-pvertex>> ] bi
[ 2dup eq? not ] [
[ next-pvertex>> ] dip
] while drop ;
Author: | Erich Ocean |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:41:09 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[
[ end-pvertex>> ] [ start-pvertex>> ] bi ,
[ 2dup eq? not ] [ [ next-pvertex>> , ] dip ] while
] V{ } make
Author: | mrjbq7 |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:45:59 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[
[ end-pvertex>> ] [ start-pvertex>> ] bi ,
[ 2dup eq? not ] [ next-pvertex>> dup , ] while 2drop
] V{ } make ;
Author: | Erich Ocean |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:51:14 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[
[ end-pvertex>> ] [ start-pvertex>> ] bi dup ,
[ 2dup eq? not ] [ [ next-pvertex>> dup , ] dip ] while
2drop
] V{ } make ;
Author: | Erich Ocean |
Mode: | factor |
Date: | Fri, 30 Apr 2010 05:56:03 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[
[ start-pvertex>> ] [ end-pvertex>> ] bi over ,
[ 2dup eq? not ] [ [ next-pvertex>> dup , ] dip ] while
2drop
] V{ } make ;
Author: | Erich Ocean |
Mode: | factor |
Date: | Fri, 30 Apr 2010 06:10:19 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[ [ end-pvertex>> ] [ start-pvertex>> ] bi dup ,
[ 2dup eq? not ] [ next-pvertex>> dup , ] while
2drop
] V{ } make ;
Author: | Slava Pestov |
Mode: | factor |
Date: | Fri, 30 Apr 2010 21:39:53 |
Plain Text |
[ end-pvertex>> ] [ start-pvertex>> ] bi [ 2dup eq? not ] [ [ next-pvertex>> ] keep ] produce
Author: | Erich Ocean |
Mode: | factor |
Date: | Sat, 1 May 2010 11:21:50 |
Plain Text |
: edge-pvertices ( edge -- pvertices )
[ end-pvertex>> ] [ start-pvertex>> ] bi
2dup eq?
[ drop 1array ]
[
dup -rot
[ 2dup eq? not ] [ [ next-pvertex>> ] keep ] produce
4 -nrot 2drop prefix
]
if ;
New Annotation