Hacker News new | past | comments | ask | show | jobs | submit login

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: