And Also after inserting struct type in set and you need type assertion after getting element from Set.
cmp := func (a,b interface{}) int {
a1 := a.(int)
b1 := b.(int)
if a1 == b1 {
return 0
}
if(a1>b1){
return 1
}
return -1
}
st := NewSet(cmp)
type orderedSet struct{
set []interface{}
size int
cmp func(a, b interface{}) int
}