chop_list : int -> 'a list -> 'a list * 'a list
- SYNOPSIS
-
Chops a list into two parts at a specified point.
- DESCRIPTION
-
chop_list i [x1;...;xn] returns ([x1;...;xi],[x(i+1);...;xn]).
- FAILURE CONDITIONS
-
Fails with chop_list if i is negative or greater than the length of the
list.
- EXAMPLE
-
# chop_list 3 [1;2;3;4;5];;
val it : int list * int list = ([1; 2; 3], [4; 5])
- SEE ALSO
-
partition.