The following is using a a few months old GSLL and SBCL -- I do not want to upgrade unless absolutely necessary at this moment, because I need to finish a project first.

Consider the following function:

(defun foo (x y)
  (let ((z (grid:map-n-grids  :combination-function (lambda (y)
                              y)
                  :sources `((,y nil)))))
    (gsll:make-interpolation gsll:+linear-interpolation+
                 x z)))

If I call it twice with vectors of different size on the second call

(let ((x #m(1d0 2d0 3d0))
      (y #m(1d0 1d0 1d0))
      (u #m(1d0 2d0 3d0 4d0))
      (v #m(1d0 1d0 1d0 1d0)))
  (foo x y)
  (foo u v))

I get an error on the second call

Invalid argument; data must match size of interpolation object in interp.c at line 76
   [Condition of type GSLL:INVALID-ARGUMENT]

It seems that `z' still somehow lives with incorrect dimensions between the calls.

In actual use, I call foo from repl.  So, before calling it, I force a recompile, so that it works for a new vector.

Is there a more elegant workaround for this problem?

Thanks,

Mirko