diff options
Diffstat (limited to 'prog')
| -rw-r--r-- | prog/hints.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/prog/hints.go b/prog/hints.go index c054b9852..a02d2d123 100644 --- a/prog/hints.go +++ b/prog/hints.go @@ -65,6 +65,16 @@ func (m CompMap) String() string { return buf.String() } +func (m CompMap) Len() int { + var count int + for _, nested := range m { + for _, nested2 := range nested { + count += len(nested2) + } + } + return count +} + // InplaceIntersect() only leaves the value pairs that are also present in other. func (m CompMap) InplaceIntersect(other CompMap) { for val1, nested := range m { |
