Re: length() of an atom
- Posted by jimcbrown (admin) Jul 28, 2010
- 1664 views
euphoric said...
What if you had length() return -1 if it was given an atom?
I guess doing abs(length(x)) would be a compromise, but it'd be a pain to have to include std/math.e for what should be a builtin operation...
If you really needed old code to crash, you could always do this:
function length(object x) if not sequence(x) then crash("TODO: add eu-lint") end if return eu:length(x) end function