[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
This page is part of the web mail archives of SRFI 101 from before July 7th, 2015. The new archives for SRFI 101 contain all messages, not just those from before July 7th, 2015.
Random-access lists are often used as functional vectors, hence
vector-like constructors may be useful. In particular, a random-access
version of `make-list' can construct lists represented in a very space
efficient manner, O(log n), thanks to sharing. I propose the following
be added to SRFI 101. I'm on the fence about whether the unary
`make-list' is useful, though. Comments welcome.
(make-list k) procedure
(make-list k fill) procedure
Returns a newly allocated list of k elements. If a second argument is
given, then each element is initialized to fill. Otherwise the initial
contents of each element is unspecified.