• Roger Peppe's avatar
    container/list: make Remove return Value of removed element. · e9afb9d3
    Roger Peppe authored
    When it is known that there is already at least one element in the
    list, it is awkwardly verbose to use three lines and an extra
    variable declaration to remove the first or last item (a common
    case), rather than use a simple expression.
    
    a stack:
    	stk.PushFront(x)
    	x = stk.Front().Remove().(T)
    
    vs.
    	stk.PushFront(x)
    	e := stk.Front()
    	e.Remove()
    	x = e.Value.(T)
    [An alternative CL might be to add PopFront and PopBack methods].
    
    R=gri
    CC=golang-dev
    https://golang.org/cl/3000041
    e9afb9d3
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libcgo Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all-nacl.bash Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...