3 ms·
Do people actually have trouble with this repeatedly, or just when they first learn about it? I started using this implementation of clamp a few years ago, and
by fouric 6y ago
Do people actually have trouble with this repeatedly, or just when they first learn about it? I started using this implementation of clamp a few years ago, and while it gave me some trouble when I first implemented it, the pattern is very simple, and I got used to it very quickly.
I use Common Lisp:
> (max min (min max n))
Is the difference my choice of language, my personal mental hardware, the amount of familiarity one has with the pattern, or none of the above?