define BBT.max

This commit is contained in:
Rígille S. B. Menezes 2021-11-06 15:27:26 -03:00
parent 51d47a726f
commit d7709263b4

12
base/BBT/max.kind Normal file
View File

@ -0,0 +1,12 @@
BBT.max<K: Type, V: Type>(map: BBT<K, V>): Maybe<Pair<K, V>>
case map {
tip:
none
bin:
case map.right {
tip:
some({map.key, map.val})
bin:
BBT.max!!(map.right)
}
}