News for hackers. Stuff that matters.
Re:The Evil Within the Comparison Functions by cesarb on Monday February 19, 2018 @08:52AM (#16412843)
Another option would be

    x.clamp(min, max)
Re:The Evil Within the Comparison Functions by geocar on Monday February 19, 2018 @09:24AM (#16413018)
Sure, and another option would be for a range "class" to do the clamping:

    Range(min, max).clamp(x)
but this turns to a conversation about syntax, and not about designing API so that we guide our users towards success.