diff options
author | Adam Chlipala <adam@chlipala.net> | 2014-06-29 08:33:47 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2014-06-29 08:33:47 -0400 |
commit | 778529d825a22a4ae0ffed046b87b6ad4ee1c496 (patch) | |
tree | 218238598a48fdb5d119334cb56573363d27ea46 /lib/ur/top.ur | |
parent | 1d498314f0fc9e941d2a10f07c86f6f8ca9ac180 (diff) |
Top.max and Top.min
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r-- | lib/ur/top.ur | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur index 5b9d43ab..3250a5a3 100644 --- a/lib/ur/top.ur +++ b/lib/ur/top.ur @@ -405,3 +405,8 @@ fun postFields pb = "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 |