ClojureScript

Elements returned from sets as functions are not the actual elements in the set.

Details

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

Description

When a set called as a function returns an element, then the argument is returned rather than the element of the set. This is apparent when the values have metadata:

=> (def my-set #{(with-meta [:a] {:n 42})})
=> (meta (my-set [:a]))
nil
=> (meta (my-set (with-meta [:a] {:x 1})))
{:x 1}

Activity

Paula Gearon made changes -
Field Original Value New Value
Description When a set called as a function returns an element, then the argument is returned rather than the element of the set. This is apparent when the values have metadata:

{code:clojure}
=> (def my-set #{(with-meta [:a] {:n 42})})
=> (meta (my-set [:a]))
nil
=> (meta (my-set (with-meta [:a] {:x 1})))
{:x 1}
{code}
When a set called as a function returns an element, then the argument is returned rather than the element of the set. This is apparent when the values have metadata:

{code}
=> (def my-set #{(with-meta [:a] {:n 42})})
=> (meta (my-set [:a]))
nil
=> (meta (my-set (with-meta [:a] {:x 1})))
{:x 1}
{code}
David Nolen made changes -
Assignee David Nolen [ dnolen ]
David Nolen made changes -
Status Open [ 1 ] In Progress [ 3 ]
David Nolen made changes -
Resolution Completed [ 1 ]
Status In Progress [ 3 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: