Clojure

rand-nth throws on empty list

Details

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

Description

rand-nth throws when given an empty list.

Solution is to either call seq on parameter, or to supply nil as a not-found parameter in call to nth. Patch fir latter fix included.

Activity

Andy Fingerhut made changes -
Field Original Value New Value
Patch Fixed [ 10009 ] Code [ 10001 ]
Rich Hickey made changes -
Approval None [ 10008 ]
Rich Hickey made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: