Skip to content

Instantly share code, notes, and snippets.

@rbe
Created March 26, 2013 18:32
Show Gist options
  • Save rbe/5247896 to your computer and use it in GitHub Desktop.
Save rbe/5247896 to your computer and use it in GitHub Desktop.

Revisions

  1. rbe created this gist Mar 26, 2013.
    9 changes: 9 additions & 0 deletions Disjunct.groovy
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    /**
    * Get disjunction (opposite of intersection) from two lists.
    * @param a List
    * @param b List
    * @return List
    */
    private List disjunct(List a, List b) {
    (a + b) - a.intersect(b)
    }