get rid of extra module level funcs
Go / test (push) Successful in 3s

This commit is contained in:
2025-11-04 15:08:32 -10:00
parent 413ab23904
commit 5ac5acd6d1
3 changed files with 17 additions and 36 deletions
+2 -6
View File
@@ -21,7 +21,7 @@ func (this *Vector) Init() *Vector {
return this
}
func Conj(this *Vector, data any) *Vector {
func (this *Vector) Conj(data any) *Vector {
newVec := New()
for _, el := range this._slice {
newVec._slice = append(newVec._slice, el)
@@ -30,10 +30,6 @@ func Conj(this *Vector, data any) *Vector {
return newVec
}
func (this *Vector) Conj(data any) *Vector {
return Conj(this, data)
}
func String(this *Vector) string {
if this == nil {
return "[]"
@@ -54,7 +50,7 @@ func (this *Vector) String() string {
func ToList(this *Vector) list.IList {
l := list.Empty()
for i := len(this._slice) - 1; i >= 0; i-- {
l = list.Conj(l, this._slice[i])
l = l.Conj(this._slice[i])
}
return l
}