Mercurial > urweb
diff lib/ur/top.ur @ 2035:a3435112b83e
Top.max and Top.min
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 29 Jun 2014 08:33:47 -0400 |
parents | 69daa6d70299 |
children | 4cd36865e0b5 |
line wrap: on
line diff
--- a/lib/ur/top.ur Sun Jun 29 08:31:21 2014 -0400 +++ b/lib/ur/top.ur Sun Jun 29 08:33:47 2014 -0400 @@ -405,3 +405,8 @@ "application/x-www-form-urlencoded" => postFields' (postData pb) | _ => error <xml>Tried to get POST fields, but MIME type is not "application/x-www-form-urlencoded"</xml> end + +fun max [t] ( _ : ord t) (x : t) (y : t) : t = + if x > y then x else y +fun min [t] ( _ : ord t) (x : t) (y : t) : t = + if x < y then x else y