![](https://secure.gravatar.com/avatar/5c13044077baec031cf34ffcb364519c.jpg?s=120&d=mm&r=g)
17 Aug
2008
17 Aug
'08
10:02 a.m.
Daniel Gackle wrote:
Parenscript ships with a helper macro like this:
(defpsmacro length (a) `(.size ,a))
But there's no "size" function for arrays or strings... in fact, is there a "size" function in JS?
.size() is a method from the Prototype library. That probably mixed up whoever put that in there.
For most things, it seems like one would want:
(defpsmacro length (a) `(@ ,a length))
I agree that is more general. I've pushed this fix out to the darcs repos. Cheers, -- Travis