In Factor:
: clamp ( x min max -- y ) [ max ] dip min ; inline
https://docs.factorcode.org/content/word-clamp,math.order.ht...