mndrix / list_util

Prolog list utility predicates
The Unlicense
11 stars 5 forks source link

Change argument order of take/3 and drop/3 #10

Closed mndrix closed 9 years ago

mndrix commented 10 years ago

I almost always want to call take(5,List0,List) rather than take(List0, 5, List). The former also works better with maplist/3. It also matches the argument of take_while/3.

This is a breaking change. Fortunately, this library is still in beta ("0" first version number) so breaking changes are permitted. Be sure to throw an exception about the change if someone calls it with the old argument order. Or maybe correct the argument order and generate a warning about the change.