Skip to content

pipes to . <- ... #32

@moodymudskipper

Description

@moodymudskipper

The base pipe creates nested calls that are hard to debug, the magrittr pipe is not obvious to debug either.
The base pipe looks even worse if we don't have the srcref, which is the case for most packages.

When preprocessing we can transform this :

res <-
  foo |>
  fun1(a) |>
  fun2(b, c =  _)

into this :

. <- foo
. <- fun1(., a)
. <- fun2(b, c= .)
res <- . 

or

`1` <- foo
`2` <- fun1(`1`, a)
`3` <- fun2(b, c= `2`)
res <- `3`

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