Creates a new `SegmentTree` from the provided slice of elements. # Arguments `arr`: A slice of elements of type `T` to initialize the segment tree. `merge`: A merging function that defines how to merge two elements of type `T`. # Returns A new `SegmentTree` instance populated with the given elements.
(arr: &[T], merge: F)