Skip to content

compose returnes only output of first function 'composed' #639

@benjaminschwetz

Description

@benjaminschwetz

This might be identical #629, but I am afraid I don't exactly understand that issue, so posting mine to be sure.

Previously this worked

n_unique <- purrr::compose(length, unique)
       n_unique(iris$Species)
#> [1] 3

Now with 0.3.0 it returns:

n_unique <- purrr::compose(length, unique)
n_unique(iris$Species)
#> [1] setosa     versicolor virginica 
#> Levels: setosa versicolor virginica

Created on 2019-02-11 by the reprex package (v0.2.1)

I read the news about the changes made to compose but in my understanding, this code should still return the same output as before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions