Skip to content

assoc-lens not working with set #311

@jnboehm

Description

@jnboehm

Using lens-set with assoc-lens does not work in case the key is not present.

> (lens-set (assoc-lens 'a) '((b 1)) 123)
'((b 1))

Using the dict-ref-lens does in fact set the key properly.

> (lens-set (dict-ref-lens 'a) '((b 1)) 123)
'((b 1) (a . 123))

To me this seems like a bug or is this intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions