core.match

Rest does not work on vectors?

Details

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

Description

(let [v [3 2 3 4]]
  (match [v]
    [[1 1 3]] :a0
    [[3 & r]] :a2))

Gives "java.lang.IllegalArgumentException: No matching clause: [3 2 3 4]"

(let [v [3 2 3 4]]
  (match [v]
    [[3 & r]] :a2))
=> :a2, as expected

(let [v [3 2 3 4]]
  (match [v]
    [[1 1 3]] :a0
    [[3 2 3 4]] :a2))
=> :a2, as expected

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: