Ulrich Scholz wrote:
>
> I'm looking for a library function to get the n-th element of a list.
>
The reason this is not in the standard lists-library
is to discourage people from using it :-)
My point is: if you want to access elements based on
their position, you should not use lists at all.
Almost any other data structure (array, hash table,
trees...) is better for this purpose.
Having said that, the (public domain) library lib(listut)
contains predicates nth0/3,4 and nth1/3,4.
--
Joachim Schimpf / phone: +44 20 7594 8187
IC-Parc / mailto:J.Schimpf@ic.ac.uk
Imperial College London / http://www.icparc.ic.ac.uk/eclipse