Ad
  • Default User Avatar
  • Custom User Avatar

    well, the wording might be a bit edgy, yes. That's why there are examples. ;)

  • Custom User Avatar

    If a value is present in b, all of its occurrences must be removed from the other:

    array_diff([1,2,2,2,3],[2]) == [1,3]

  • Custom User Avatar

    Correction: you "don't understand why"... ;) Because you'd bet that with thausends of completions, the description and the examples are correct.

    It should remove all values from list a, which are present in list b.

    a = [1,2,2]
    b = [2]
    
    apply the rule above => only [1] remains