 [ f ] [ 8 i4 in? ] unit-test
 [ f ] [ 9 i4 in? ] unit-test
 
-: i5 ( -- set )
+CONSTANT: i5 $[
     { { 2 5 } } <interval-set>
     { { 4 8 } } <interval-set>
-    <interval-or> ;
+    <interval-or> ]
 
 [ f ] [ 1 i5 in? ] unit-test
 [ t ] [ 2 i5 in? ] unit-test

[ t ] [ 8 i3 in? ] unit-test
[ f ] [ 9 i3 in? ] unit-test

: i4 ( -- set )
    { { 2 4 } } <interval-set>
    { { 6 8 } } <interval-set>
    <interval-and> ;

[ f ] [ 1 i4 in? ] unit-test
[ f ] [ 2 i4 in? ] unit-test

! Copyright (C) 2009 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: tools.test interval-sets math grouping sequences accessors
combinators.short-circuit literals ;
IN: interval-sets.tests

[ f ] [ 0 T{ interval-set } in? ] unit-test
[ f ] [ 2 T{ interval-set } in? ] unit-test

CONSTANT: i1 $[
    { { 3 4 } } <interval-set> ]

[ f ] [ 2 i1 in? ] unit-test
[ t ] [ 3 i1 in? ] unit-test
