;; help function (bind-func range-limit (lambda (v:double l:double h:double) (if (< v l) l (if (> v h) h v))))