lib/interpolation/one_dimensional.rb
def for_each interpolant
      result = []

      if interpolant.kind_of? Numeric
        return yield interpolant
      else
        interpolant.each { |x| result << yield(x) }
      end

      result
    end
def for_each interpolant
      result = []

      if interpolant.kind_of? Numeric
        return yield interpolant
      else
        interpolant.each { |x| result << yield(x) }
      end

      result
    end
Linear interpolation functions