Clojure

flatten docstring does not describe lazy result

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Trivial Trivial
  • Resolution: Unresolved
  • Affects Version/s: Release 1.8
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    All
  • Patch:
    Code
  • Approval:
    Prescreened

Description

clojure.core/flatten uses tree-seq to return a lazy result. The lazy nature of the result is not described in the docstring.

Original docstring:
--------------------------------
"Takes any nested combination of sequential things (lists, vectors,
etc.) and returns their contents as a single, flat sequence.
(flatten nil) returns an empty sequence."

Proposed docstring:
--------------------------------
"Takes any nested combination of sequential things (lists, vectors,
etc.) and returns their contents as a single, flat lazy sequence.
(flatten nil) returns an empty sequence."

Prescreened by: Alex Miller

Activity

Hide
Alex Miller added a comment -

Seems reasonable.

Show
Alex Miller added a comment - Seems reasonable.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: