Tamas K Papp
2011-06-10 14:53:06 UTC
Content preview: Hi, I tried to save a supplied-p parameter from a BOA constructor
like this: (defstruct (delayed-iseq (:constructor iseq (start-or-end &optional
(end 0 end?) (by 1) strict-direction?))) "Delayed index sequence evaluation."
start-or-end end end? by strict-direction?) [...]
Content analysis details: (-2.3 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FREEMAIL_FROM Sender email is freemail (tkpapp[at]gmail.com)
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[80.91.229.12 listed in list.dnswl.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
domain
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/419>
Hi,
I tried to save a supplied-p parameter from a BOA constructor like this:
(defstruct (delayed-iseq
(:constructor iseq (start-or-end
&optional (end 0 end?) (by 1)
strict-direction?)))
"Delayed index sequence evaluation."
start-or-end end end? by strict-direction?)
but SBCL complained that end? was not used. After rereading the CLHS
page for defstruct, I am still not 100% sure why this is. My
intepretation is that END? is an argument like any other, but probably I
am not getting something.
Anyhow, instead I used
(defstruct delayed-iseq
"Delayed index sequence evaluation."
start-or-end end end? by strict-direction?)
(defun iseq (start-or-end &optional (end 0 end?) (by 1) strict-direction?)
(make-delayed-iseq :start-or-end start-or-end :end end :end? end? :by by
:strict-direction? strict-direction?))
Is there a way to do it in a single defstruct definition?
Best,
Tamas
PS.: (eq end nil) is different from when it is not supplied, hence the
need to save end?.
like this: (defstruct (delayed-iseq (:constructor iseq (start-or-end &optional
(end 0 end?) (by 1) strict-direction?))) "Delayed index sequence evaluation."
start-or-end end end? by strict-direction?) [...]
Content analysis details: (-2.3 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.0 FREEMAIL_FROM Sender email is freemail (tkpapp[at]gmail.com)
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium
trust
[80.91.229.12 listed in list.dnswl.org]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay
domain
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL
Archived-At: <http://permalink.gmane.org/gmane.lisp.cl-pro/419>
Hi,
I tried to save a supplied-p parameter from a BOA constructor like this:
(defstruct (delayed-iseq
(:constructor iseq (start-or-end
&optional (end 0 end?) (by 1)
strict-direction?)))
"Delayed index sequence evaluation."
start-or-end end end? by strict-direction?)
but SBCL complained that end? was not used. After rereading the CLHS
page for defstruct, I am still not 100% sure why this is. My
intepretation is that END? is an argument like any other, but probably I
am not getting something.
Anyhow, instead I used
(defstruct delayed-iseq
"Delayed index sequence evaluation."
start-or-end end end? by strict-direction?)
(defun iseq (start-or-end &optional (end 0 end?) (by 1) strict-direction?)
(make-delayed-iseq :start-or-end start-or-end :end end :end? end? :by by
:strict-direction? strict-direction?))
Is there a way to do it in a single defstruct definition?
Best,
Tamas
PS.: (eq end nil) is different from when it is not supplied, hence the
need to save end?.