+2
-6
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user