Closed gavv closed 5 months ago
core::List, core::Hashmap and other classes in roc_core have front() and back() methods.
It would be nice to add front() and back() to core::Array too.
Unlike List, Array holds values, not pointers, so these methods should return references, not pointers. They should panic if array is empty.
New methods should be covered with tests.
@gavv would like to work on this one if not already assigned.
Sure, thanks!
Landed
core::List, core::Hashmap and other classes in roc_core have front() and back() methods.
It would be nice to add front() and back() to core::Array too.
Unlike List, Array holds values, not pointers, so these methods should return references, not pointers. They should panic if array is empty.
New methods should be covered with tests.