Clojure-Contrib

str-utils2: seq-like functions have different argument order

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

clojure.contrib.str-utils2 contains several functions with the same names as clojure.core functions: take, drop, butlast. However, their argument order is reversed from the order used by the clojure.core functions.

One of the stated design goals of str-utils2 is to have all functions take the string they are operating on as their first argument, to enable easy composition with ->

Either these functions should be renamed, as "str-take", or a note should be added to their documentation explaining the argument order.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/17
Hide
Assembla Importer added a comment -

stuart.sierra said: (In revision:3b6d95140393bf78930c9f4045ba2feab36f3946) str_utils2.clj: explain argument order of take/drop/butlast, refs #17

Branch: master

Show
Assembla Importer added a comment - stuart.sierra said: (In revision:3b6d95140393bf78930c9f4045ba2feab36f3946) str_utils2.clj: explain argument order of take/drop/butlast, refs #17 Branch: master
Hide
Assembla Importer added a comment -

stuart.sierra said: Added documentation, don't want longer function names or to break the string-argument-first design.

Show
Assembla Importer added a comment - stuart.sierra said: Added documentation, don't want longer function names or to break the string-argument-first design.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: