Uploaded image for project: 'Clojure'
  1. CLJ-1333

Documentation for "=" is misleading

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: Release 1.5
    • Fix versions: None
    • Labels:
    • Environment:

      linux 2.6.32-431.el6.x86_64

      Description

      Document for clojure.core/= says it compares numbers in a type-independent manner. In reality the comparission is made in a type dependent manner. If the above statement was true then (= 1 1.0) would eval to true not false;

      clojure.core/=
      ([x] [x y] [x y & more])
      Equality. Returns true if x equals y, false if not. Same as
      Java x.equals except it also works for nil, and compares
      numbers and collections in a type-independent manner. Clojure's immutable data
      structures define equals() (and thus =) as a value, not an identity,
      comparison.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: