Numeric antiderivative for a noncontinuous function using ODEProblem

after some digging i think the following would give me a foot in the door with ApproxFun.jl

using ApproxFun
function approx_piecewise(f::Function, points::Vector{T}) where T<:Real
  segs = (Segment(a, b) for (a, b) in zip(points, points[2:end]))
  Fun(f, union(segs...))
end

here, points is the list of points of discontinuity, flanked by the left and right boundaries of the support of the function f to be interpolated