Boo. You can pass the sequence length to :start, but you cannot pass
NIL which denotes the length to :end. This broke a beautiful piece of
chained POSITIONs.
I hope it at least buys us a significant optimization.
- Daniel
What would you want the meaning of NIL to be in this case? The start of
the list, ie a synonym for 0, or the length of the list (in which case
it seems that POSITION should simply return NIL)?
Alberto
Look up "bounding index designator" in the CLHS glossary. I thought
NIL always meant the length of the sequence. This stupid
clarification botches that simple understanding.
The code in question was a pair of two POSITIONs splitting key/value
pairs out of a string. I thought (position ... :start nil) would
return NIL. It was elegant, but the replacement code is not much worse.
Oh well.
- Daniel
> (or (f args) somethingelse)
No, he wants to use (f args) in "somethingelse", so the when-bind macro
(probably in alexandria) does exactly what he wants.
--
Rahul Jain
rj...@nyct.net
Professional Software Developer, Amateur Quantum Mechanicist