Clojure

GC Issue 87: *-seq should return seq/nil

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.1
  • Component/s: None
  • Labels:
    None
  • Approval:
    Ok

Description

Reported by aaraines, Feb 26, 2009

This patch alters line-seq, resultset-seq, re-seq, and tree-seq to return
nil if the LazySeq is empty, as discussed in #clojure.

http://clojure-log.n01se.net/date/2009-02-26.html#14:05

Comment 1  by aaraines, Feb 26, 2009

Patch against SVN 1309.

Comment 2 by aaraines, Feb 27, 2009

This patch uses (seq s) for its test rather than (first s).

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - oranenj said: [file:acJw44w38r3Ou4eJe5aVNr]
Hide
Assembla Importer added a comment -

oranenj said: [file:acJzTGw38r3Ou4eJe5aVNr]: on comment 3

Show
Assembla Importer added a comment - oranenj said: [file:acJzTGw38r3Ou4eJe5aVNr]: on comment 3
Hide
Assembla Importer added a comment -

richhickey said: As of patch aar-star-seq-nil-2.patch this is still not quite right. The logic should be, do the read/whatever, if something, return (cons something (lazy-seq again)), else return nil. aar-star-seq-nil-2.patch is creating a lazy seq then immediately forcing it.

Show
Assembla Importer added a comment - richhickey said: As of patch aar-star-seq-nil-2.patch this is still not quite right. The logic should be, do the read/whatever, if something, return (cons something (lazy-seq again)), else return nil. aar-star-seq-nil-2.patch is creating a lazy seq then immediately forcing it.
Hide
Assembla Importer added a comment -

drewr said: [file:aXOzTMJNer3QCTeJe5aVNr]: *-seq returns lazy-seq or nil

Show
Assembla Importer added a comment - drewr said: [file:aXOzTMJNer3QCTeJe5aVNr]: *-seq returns lazy-seq or nil
Hide
Assembla Importer added a comment -

drewr said: Since tree-seq always returns a seq with at least one element, I did not include it in this ticket. I hope that's correct.

Show
Assembla Importer added a comment - drewr said: Since tree-seq always returns a seq with at least one element, I did not include it in this ticket. I hope that's correct.
Hide
Assembla Importer added a comment -

technomancy said: +1; this looks good to me.

Show
Assembla Importer added a comment - technomancy said: +1; this looks good to me.
Hide
Assembla Importer added a comment -

richhickey said: issue-91-star-seq-nil.diff ok

Show
Assembla Importer added a comment - richhickey said: issue-91-star-seq-nil.diff ok

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: