nth and take-nth argument order

68 views
Skip to first unread message

Michael Wood

unread,
Nov 8, 2008, 2:44:58 PM11/8/08
to clo...@googlegroups.com
Is there any particular reason for the reversal of the order of
arguments between nth and take-nth? I would have expected something
like:

clojure/nth
([n coll])

clojure/take-nth
([index coll]) ([index coll not-found])

or else:

clojure/nth
([coll n])

clojure/take-nth
([coll index]) ([coll index not-found])

--
Michael Wood <esio...@gmail.com>

Rich Hickey

unread,
Nov 8, 2008, 3:08:12 PM11/8/08
to Clojure


On Nov 8, 2:44 pm, "Michael Wood" <esiot...@gmail.com> wrote:
> Is there any particular reason for the reversal of the order of
> arguments between nth and take-nth?

Short answer - take-nth is more like take.

Longer answer:

http://groups.google.com/group/clojure/browse_frm/thread/8b2c8dc96b39ddd7/a8866d34b601ff43

Rich

Michael Wood

unread,
Nov 8, 2008, 5:00:44 PM11/8/08
to clo...@googlegroups.com

Ah, thanks.

--
Michael Wood <esio...@gmail.com>

Reply all
Reply to author
Forward
0 new messages