xplenty_rb.bags_intersect

Description

Returns the intersection between two bags. The result is the items that appear in both bag1 and bag2.

Syntax

xplenty_rb.bags_intersect(bag1, bag2)

Examples

bag1 is [(1),(2),(3)]
bag2 is: [(1),(1),(2),(4)]

xplenty_rb.bags_intersect(bag1,bag2) returns [(1),(2)].

Return value datatype

Bag

Notes

If none of the values exist in both bag1 and bag2, an empty bag is returned.

Impact of null value

If either bag is null, returns null.