Skip to content

fnk binding form can't combine optional parameters with destructuring #114

@vilmibm

Description

@vilmibm

When defining a fnk, I'd hope to be able to do something like this:

((fnk [{[:sub foo] 1} bar] (+ foo bar)) {:sub {:bar 1}})

to get back 2. Unfortunately, combining the optional {} syntax with the [] destructuring syntax does not work:

CompilerException java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named, compiling:(*cider-repl trapperkeeper*:16:32) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions