Hacker News new | past | comments | ask | show | jobs | submit login

It looks like the third number specifies an index, not a length.

  var array [10]int
  slice = array[2:4:7]
> its capacity is now only 5 elements (7-2)



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: