[m-rev.] for review: document failrue conditions for list.split/4
Peter Wang
novalazy at gmail.com
Thu Jun 2 15:09:28 AEST 2016
On Thu, 2 Jun 2016 12:06:38 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>
> For review by anyone.
>
> I would also be intrested in feedback whether the current behaviour
> of list.{drop,take} when their first argument is negative is intended.
I think the behaviour is okay, and consistent with at least the indexing
predicates in the list module.
BTW, index0 and member_index0 will traverse the entire list for a
negative index, if anyone cares.
>
> -----------------
>
> Document failure conditions for list.split/4.
>
> Improve test coverage of list.split_list, list.drop and list.take.
>
> library/list.m:
> Document the failure conditions for split_list/4.
>
> Document that det_split_list/4 will also throw an exception for N < 0.
>
> tests/hard_coded/split_list.{m,exp}:
> Test for list.split_list/4.
>
> tests/hard_coded/take_and_drop.m:
> Ditto for list.take/3 and list.drop/3.
>
> tests/hard_coded/Mmakefile:
> Add the new tests.
That's fine.
Peter
More information about the reviews
mailing list