aboutsummaryrefslogtreecommitdiff
path: root/lib/bytes/bytes_example_test.go
diff options
context:
space:
mode:
authorShulhan <m.shulhan@gmail.com>2019-09-24 22:40:55 +0700
committerShulhan <m.shulhan@gmail.com>2019-09-24 22:40:55 +0700
commit832adfee60a040fe23150d0e4a40c0066b70a73f (patch)
treeb27eae6756974b75663a2a112157d462bbdd4a46 /lib/bytes/bytes_example_test.go
parent7eacd3ade3ecc83ee59ca8ce14cb60c2082096a3 (diff)
downloadpakakeh.go-832adfee60a040fe23150d0e4a40c0066b70a73f.tar.xz
ints: add function to merge two slices of integers by distance
MergeByDistance merge two slice of integers by their distance between each others. For example, if slice a contains "{1, 5, 9}" and b contains "{4, 11, 15}" and the distance is 3, the output of merged is "{1, 5, 9, 15}". The 4 and 11 are not included because 4 is in range between 1 and (1+3), and 11 is in range between 9 and 9+3.
Diffstat (limited to 'lib/bytes/bytes_example_test.go')
0 files changed, 0 insertions, 0 deletions