core: filter() to accept also tuples