interval-sets: can just check one side or the other.

db4
John Benediktsson 2014-05-19 09:40:51 -07:00
parent 5a5c1b857f
commit 376121eeed
1 changed files with 2 additions and 3 deletions

View File

@ -20,9 +20,8 @@ PRIVATE>
: in? ( key set -- ? )
check-interval-set array>>
over dupd [ >=< ] curry search drop [
dup even? [ dup 1 + ] [ [ 1 - ] keep ] if rot
[ nth-unsafe ] curry bi@ 1 - between?
dupd [ <=> ] with search swap [
even? [ >= ] [ 1 - <= ] if
] [ 2drop f ] if* ;
<PRIVATE