From f76759b9e0a53daab9f0a220357d176a7ff41315 Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Tue, 21 Jul 2020 14:39:42 -0700 Subject: [PATCH] zuse: added docstring and warning --- pkg/arvo/sys/zuse.hoon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 5dcdece72..5b02b3e29 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -7071,6 +7071,9 @@ -- -- :: +:: +mop: constructs and validates ordered ordered map based on key, +:: val, and comparator gate +:: ++ mop |* [key=mold value=mold] |= ord=$-([key key] ?) @@ -7088,6 +7091,9 @@ :: smallest key can be popped off the head. If $key is `@` and :: .compare is +lte, then the numerically smallest item is the head. :: +:: WARNING: ordered-map will not work properly if two keys can be +:: unequal under noun equality but equal via the compare gate +:: ++ ordered-map |* [key=mold val=mold] => |%