between?: func [ value bound-1 bound-2 /exclusive /local low-bound high-bound ][ set [low-bound high-bound] sort reduce [bound-1 bound-2] either exclusive [ all [(value > low-bound) (value < high-bound)] ][ ;-- Inclusive comparison all [(value >= low-bound) (value <= high-bound)] ] ]
You need to create an account or log in to post comments to this site.