Brilliant! - thank you so much - that works just as it should. Why cannot the input to integration-qagp be simply a list or a vector? As in
(gsll:integration-QAGp 'integration-test-f454 '(0.0d0 1.0d0 (sqrt 2.0d0) 3.0d0) 0.0d0 1.0d-3 1000)
or
(gsll:integration-QAGp 'integration-test-f454 (vector 0.0d0 1.0d0 (sqrt 2.0d0) 3.0d0) 0.0d0 1.0d-3 1000)
I'm not sure (told you I was a newbie!) what grid provides that a list or vector can't.
And here's a tiny problem from my tiny brain: suppose the endpoints and singularities are given as a standard Lisp list, S say. Then (I'm using SBCL):
(defvar S2)
(setf S2 (grid:make-foreign-array 'double-float :dimensions (length S) :initial-contents S))
turns the list into a foreign array grid (is there an easier way?). But then, my attempts to use S2 as input to gaqp produces errors:
(gsll:integration-QAGp 'my-fun 'S2 0.0d0 1.0d-3 1000)
Basically I need a way of turning a numeric list into input for integration-QAGp. I'll keep fiddling!