Skip to content

Inserts do not replace previous keys #5

@9072997

Description

@9072997
package main

import (
	"fmt"

	"github.com/vishalkuo/bimap"
)

func main() {
	m := bimap.NewBiMap()
	m.Insert("foo", 100)
	m.Insert("foo", 200)
	exists := m.ExistsInverse(100)
	fmt.Println(exists)
}

This prints true. Intuitively I would expect 200 to replace 100. If this is intentional behavior I feel it should be documented. Thanks for the project btw.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions