# Functions
ApplyFilter applies a filter to our UIDList.
IndexOf performs a binary search on the uids slice and returns the index at which it finds the uid, else returns -1.
IntersectSorted intersect a list of UIDLists.
IntersectWith intersects u with v.
MergeSorted merges sorted lists.
ToUintsListForTest converts to list of uints for testing purpose only.