Skip to content

list_modify removes elements when replacement is NULL (aka zaps) #810

@vspinu

Description

@vspinu

Given that zap() is there it doesn't seem reasonable to allow NULLs to remove elements from the list:

> list_modify(list(a = 1, b = 3), b = NULL)
$a
[1] 1

> list_modify(list(a = 1, b = 3), b = zap())
$a
[1] 1

It doesn't seem to be a way to insert NULS into a list with list modify currently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementlist 🧦

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions