Creates an empty range from the given range in O(1). If it can, it will return the same range type. If not, it will return takeExactly(range, 0).
import std.algorithm.iteration : filter; assert(takeNone([42, 27, 19]).empty); assert(takeNone("dlang.org").empty); assert(takeNone(filter!"true"([42, 27, 19])).empty);
See Implementation
Creates an empty range from the given range in O(1). If it can, it will return the same range type. If not, it will return takeExactly(range, 0).