 ! Set protocol
 MIXIN: set
 GENERIC: adjoin ( elt set -- )
+GENERIC: ?adjoin ( elt set -- ? )
 GENERIC: in? ( elt set -- ? )
 GENERIC: delete ( elt set -- )
 GENERIC: set-like ( set exemplar -- set' )

: without ( seq set -- subseq )
    tester [ not ] compose filter ;

: ?adjoin ( elt set -- ? )
    2dup in? [ 2drop f ] [ adjoin t ] if ; inline

: adjoin-all ( seq set -- )
    [ adjoin ] curry each ;



! Defaults for some methods.
! Override them for efficiency

M: set ?adjoin 2dup in? [ 2drop f ] [ adjoin t ] if ;

M: set null? members null? ; inline

