title: Compare two slices
body: <p>Is there a way in Go to compare two slices and get the elements in slice X that are not in slice Y and vice versa?</p>
  
  <pre><code>    X := []int{10, 12, 12, 12, 13}
      Y := []int{12, 14, 15}
  
  func compare(X, Y []int)  
  
  calling compare(X, Y)   
      result1 := []int{10, 12, 12, 13} // if you're looking for elements in slice X that are not in slice Y
  
  calling compare(Y, X)
      result2 := []int{14, 15} // if you're looking for elements in slice Y that are not in slice X
  </code></pre>