Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

subset? and superset? functions (See related posts)

    subset?: func [
        {Returns true if A is a subset of B; false otherwise.}
        a [series! bitset!]
        b [series! bitset!]
    ] [
        empty? exclude a b
    ]

    superset?: func [
        {Returns true if set1 is a superset of set2; false otherwise.}
        set1 [series! bitset!]
        set2 [series! bitset!]
    ][
        subset? set2 set1
    ]

You need to create an account or log in to post comments to this site.


Click here to browse all 4861 code snippets

Related Posts