FAQ
I think if a func returns `container.List` is less explicit than a func
retuning `[]ele`.

On Tuesday, January 13, 2015 at 10:44:39 PM UTC+8, Konstantin Khomoutov
wrote:
On Tue, 13 Jan 2015 06:38:14 -0800 (PST)
Gao <gaop...@gmail.com <javascript:>> wrote:
1.
copy(s[i:],s[i+:])
s[len(s)-1]=nil

2.
s = append(s[:i],s[i+1:])

which is better?
You might consider using a linked list [1] or a map instead.

1. http://golang.org/pkg/container/list/
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 6 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 13, '15 at 2:38p
activeJan 13, '15 at 3:54p
posts6
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase