(36 lines)
1 '\" t2 .\" Copyright (c) 2025 Bruce Hill3 .\" All rights reserved.4 .\"5 .TH List.by 3 2025-11-29 "Tomo man-pages"6 .SH NAME7 List.by \- slice by a step value8 .SH LIBRARY9 Tomo Standard Library10 .SH SYNOPSIS11 .nf12 .BI List.by\ :\ func(list:\ [T],\ step:\ Int\ ->\ [T])13 .fi14 .SH DESCRIPTION15 Creates a new list with elements spaced by the specified step value.18 .SH ARGUMENTS20 .TS21 allbox;22 lb lb lbx23 l l l.24 Name Type Description25 list [T] The original list.26 step Int The step value for selecting elements.27 .TE28 .SH RETURN29 A new list with every `step`-th element from the original list.31 .SH EXAMPLES32 .EX33 assert [1, 2, 3, 4, 5, 6].by(2) == [1, 3, 5]34 .EE35 .SH SEE ALSO36 .BR Tomo-List (3)