Re: length() of an atom
- Posted by DerekParnell (admin) Jul 28, 2010
- 1644 views
euphoric said...
Elements only exist in the context of a sequence. No sequence, no elements. That last 'x' is not an element.
Does an egg exist outside of its carton?
euphoric said...
Regardless, I don't think this change will hurt much, if at all. So have at it. :)
Awwww ... don't give in so soon
euphoric said...
But I'm curious, how does returning 1 for length(atom) make coding simpler and more user-friendly? What case did you discover works better with length(atom) returning 1?
--- r = x[1 .. i] & q & [i+1 .. $] if atom(q) then n += 1 else n += length(q) end if ---
but now I can code ...
--- r = x[1 .. i] & q & [i+1 .. $] n += length(q) ---