3 ms·
I'm a big python user, with some lisp coding in the past. I took a look at his code and I'm just wondering if this is any different than xrange() in python? For
by sgk284 18y ago
I'm a big python user, with some lisp coding in the past. I took a look at his code and I'm just wondering if this is any different than xrange() in python? For those that don't know, xrange is a generator of integer sequences... a way of iterating a "list" of N integers while only allocating space for 1 integer.
*note: This isn't a "python is better" argument, it's an "I'm surprised sbcl doesn't provide xrange type functionality, am I right in that assumption" argument.
- BrandonM 18y agoIt looked like xrange to me. Honestly, though, I can see why it's not in SBCL, because I don't actually find myself using xrange all that much. It's mostly stuff like: for unused in xrange(500): # perform some operation (500 times) In Lisp, this is just: (dotimes (unused 500) ; perform some operation... )