Skip to content

v1.7.0

Choose a tag to compare

@elliotchance elliotchance released this 30 Apr 12:06
Implementation of Top and Bottom functions (#60)

Top function
that returns n elements from head of slice
for [1,2,3] and n = 2 it returns [1,2]
for n < 0 && n == 0 it returns empty slice
if n more than lenght of slice returns all elements

Bottom function
that returns n elements from bottom
in order from bottom
it means for this [1,1,2] bottom(2) will return [2,1]