Clojure

thread-last can't accept 0 or 1 forms, thread-first can't accept 0 forms

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

At times, as the artifact of repl experimentation or a refactoring in progress, one wants to eval a threaded form with 1 or (less likely) 0 arguments.

(-> 42) ; fine
(->> 42) ; throws "ArityException Wrong number of args (1) passed to: core$-GT".

(->) ; throws "ArityException Wrong number of args (0) passed to: core$" (sic)
(->>) ; throws "ArityException Wrong number of args (0) passed to: core$-GT".

Apologies for the text rendering (how to cite code?).

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: