def glue.fin.bnd

bend-kit-collections@0.1.4.1 · PROOF.bend:1136

import bend-kit-collections@0.1.4.1/PROOF.bend as PROOF
import Base
import bend-kit-collections@0.1.4.1/LAWS.bend as Laws
import bend-kit-collections@0.1.4.1/omap.bend as O

1136# Workaround for https://github.com/bendlang/bend/issues/1077: bind the tuple without +.
1137def glue.fin.bnd(
1138  ~K: Data, ~V: Data, ~cmp: K -> K -> Cmp, ~trans: Trans(~K, ~cmp),
1139  r: K & V & O.OMap<K, V>, +lo: O.OMap<K, V>, +lb: Maybe<&2, K>,
1140  +ub: Maybe<&2, K>, +key: K,
1141  eka: {Laws.above(~K, ~cmp, lb, key) == True{} : Bool},
1142  el: {Laws.bounded(~K, ~V, ~cmp, lo, lb, Some{key}) == True{} : Bool},
1143  pmr: {PM(~K, ~V, ~cmp, Some{key}, ub, r) == True{} : Bool}
1144) -> {Laws.bounded(~K, ~V, ~cmp, O.OMap.glue.fin(K, V, lo, r), lb, ub) == True{} : Bool}:
1145  (mk, rest) = r
1146  (mv, t) = rest
1147  glue.fin.bnd.go(~K, ~V, ~cmp, ~trans, mk, mv, t, lo, lb, ub, key, eka, el, pmr)

Uses (12)

Used by (1)