sublist
lib.lists.sublist
Docs pulled from | This Revision | 35 minutes ago
Return a list consisting of at most count
elements of list
,
starting at index start
.
Inputs
start
-
Index at which to start the sublist
count
-
Number of elements to take
list
-
Input list
Type
sublist :: int -> int -> [a] -> [a]
Examples
lib.lists.sublist
usage example
sublist 1 3 [ "a" "b" "c" "d" "e" ]
=> [ "b" "c" "d" ]
sublist 1 3 [ ]
=> [ ]