[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Merging nth, aref, and elt.
From: |
Stephen J. Turnbull |
Subject: |
Re: Merging nth, aref, and elt. |
Date: |
Sat, 01 Nov 2014 10:08:10 +0900 |
Stefan Monnier writes:
> >> So it looks like there's nothing to be done. here :-)
> > I think there is:
> > - The efficiency of (setf (elt s i) v) needs to be improved.
> > - I'd argue that `elt' should also work on hash tables.
>
> A few more steps, and `elt' becomes foo-get.
`get' should just work on everything. (It's a shame getf has a
conflicting definition.)
But note that (get not-necessarily-symbolp-obj 0) has a gotcha: for
sequences 0 means the first object when iterating, for hashes and
symbols it means the value of the mapping at the object which
represents the integer 0 (which happens to be unique in Lisp). So
it's potentially ambiguous.
- Merging nth, aref, and elt., Artur Malabarba, 2014/10/29
- Re: Merging nth, aref, and elt., Stefan Monnier, 2014/10/29
- Re: Merging nth, aref, and elt., David Kastrup, 2014/10/30
- Re: Merging nth, aref, and elt., Artur Malabarba, 2014/10/31
- Re: Merging nth, aref, and elt., Stefan Monnier, 2014/10/31
- Re: Merging nth, aref, and elt., Stefan Monnier, 2014/10/31
- Re: Merging nth, aref, and elt.,
Stephen J. Turnbull <=
- Re: Merging nth, aref, and elt., Stefan Monnier, 2014/10/31