Paste: member? member-of?

Author: erg
Mode: factor
Date: Sun, 31 Jul 2022 15:44:54
Plain Text |
: member? ( elt seq -- ? )
    [ = ] with any? ;

: member-of? ( seq elt -- ? )
    [ = ] curry any? ;

: member-eq? ( elt seq -- ? )
    [ eq? ] with any? ;

: member-eq-of? ( seq elt -- ? )
    [ eq? ] curry any? ;

: remove ( elt seq -- newseq )
    [ = ] with reject ;

: remove-of ( seq elt -- newseq )
    [ = ] curry reject ;

: remove-eq ( elt seq -- newseq )
    [ eq? ] with reject ;

: remove-eq-of ( seq elt -- newseq )
    [ eq? ] curry reject ;

New Annotation

Summary:
Author:
Mode:
Body: