News for hackers. Stuff that matters.
Re:2 is a code smell by daemin on Wednesday October 12, 2011 @08:14PM (#3105326)
I think your original function was pure in the mathematical sense, but since you were operating on a data structure that is specifically 2 or 3 elements long, then you don't need to be that generic.

Just think of a vector of 3 elements as being one entity, and therefore it still obeys the 0, 1, Inf rule mentioned elsewhere in the comments.

There are no comments on this comment yet.