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

LazySeq switches to equiv when using equals

    Details

    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      When comparing lazy seqs with java equality operator .equals, the implementation switches to the Clojures .equiv comparison. This switch is not present in any other Seq or ordered collection type.

      user> (.equals '(3) '(3N))
      false
      user> (.equals [3] [3N])
      false
      user> (.equals (seq [3]) (seq [3N]))
      false
      user> (.equals (lazy-seq [3]) (lazy-seq [3N]))
      true
      

      Screened by: Alex Miller

        Attachments

          Activity

            People

            • Assignee:
              wagjo Jozef Wagner
              Reporter:
              wagjo Jozef Wagner
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: