History of Idiom 165 > diff from v36 to v37
Edit summary for version 37 by programming-idioms.org:
[Go] Panics if the list is empty.
[Go] Panics if the list is empty.
↷
Version 36
2019-09-06, 11:18:09
Version 37
2019-09-08, 14:57:53
Idiom #165 Last element of list
Assign to variable x the last element of list items.
Idiom #165 Last element of list
Assign to variable x the last element of list items.
Comments bubble
There is no shortcut, use len!
Comments bubble
There is no shortcut, use len!
Panics if the list is empty.