[erlang-questions] lists documentation error

Jay Nelson <>
Fri Jun 13 06:57:57 CEST 2008


The documentation for lists:sublist/3 gives an example to show that  
there is no error for start+length > the length of the list:

 > lists:sublist([1,2,3,4], 5, 2).
[]

However, in R12B-2 I try the following:

 > lists:sublist([1,2,3,4], 6, 2).
** exception error: no function clause matching lists:nthtail(1,[])
      in function  lists:sublist/3

jay




More information about the erlang-questions mailing list