See below for the fix. Thank's to everyone's help and suggestions. I still have only a dim understanding of what is going on. But I am only in year three of the 10-year lisp journey :-)<br><br><div class="gmail_quote">
On Tue, Feb 9, 2010 at 9:54 AM, Mirko Vukovic <span dir="ltr"><<a href="mailto:mirko.vukovic@gmail.com" target="_blank">mirko.vukovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div>On Tue, Feb 9, 2010 at 9:30 AM, <span dir="ltr"><<a href="mailto:Joerg-Cyril.Hoehle@t-systems.com" target="_blank">Joerg-Cyril.Hoehle@t-systems.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mirko,<br>
<div><br>
>Are you implying that instead of lambda forms one should define the<br>
>functions and use function names.<br>
</div>No. Just look at the examples in the source code, incl. tests.<br>
The key is to write #'(lambda ...) aka. (function (lambda ...)), not (lambda ...)<br></blockquote></div><div><br>Like this?<div><br><br>(defclause-sequence matrix-row matrix-row-index<br> :access-fn<br></div>
#'(lambda (grid index)<br>
(assert (and (grid:gridp grid) (eql (grid:grid-rank grid) 2))<br> (grid))<br> (grid:row grid index))<br> :size-fn<br> #'(lambda (grid)<br> (assert (and (grid:gridp grid) (eql (grid:grid-rank grid) 2))<br>
(grid))<br> (first (grid:grid-dimensions grid)))<div><br> :element-type t :sequence-type t<br> :element-doc-string "(copied) rows of a matrix"<br> :index-doc-string "index of the rows in a matrix") <br>
<br></div>Unfortunately, that did not help improve things.<br></div></div><br>Also, the iterate documentation has an example of `defclause-sequence' (bottom of p.26 of the pdf file). There is no #'(lambda ...), just plain (lambda ...)<br>
<br>Thank you for your time,<br></blockquote></div><br><br>The fix was to put a single quote in front of the (lambda ...) expressions like this:<br><br>(defclause-sequence matrix-row matrix-row-index<br> :access-fn <br>
'(lambda (grid index)<br> (assert (and (grid:gridp grid) (eql (grid:grid-rank grid) 2))<br> (grid))<br> (grid:row grid index))<br> :size-fn <br> '(lambda (grid)<br>
(assert (and (grid:gridp grid) (eql (grid:grid-rank grid) 2))<br> (grid))<br> (first (grid:grid-dimensions grid)))<br> :element-type t :sequence-type t<br> :element-doc-string "(copied) rows of a matrix"<br>
:index-doc-string "index of the rows in a matrix")<br><br>Not #'(lambda ...). The same goes for named functions. Thus 'foo and not #'foo.<br><br>Mirko<br><br><br><br><br>