Clojure

Syntax quoted form produces a sequence, not a list

Details

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

Description

Syntax quote returns clojure.lang.Cons instead of IPersistenList.
But simple quote always returns list.

(list? '(1))     => true
(list? '(1 2 3)) => true
(list? `(1))     => true
(list? `(1 2 3)) => false

Activity

Hide
Stuart Halloway added a comment -

It is unusual in Clojure to expect/rely on concrete list? checks, particularly given the prevalence of seq?

If the behavior documented here is causing problems, please discuss use case on mailing list, and then we can open a ticket.

Show
Stuart Halloway added a comment - It is unusual in Clojure to expect/rely on concrete list? checks, particularly given the prevalence of seq? If the behavior documented here is causing problems, please discuss use case on mailing list, and then we can open a ticket.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: