Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken edgecase when mixing |> and .|> #20

Open
racinmat opened this issue Aug 19, 2020 · 3 comments
Open

Broken edgecase when mixing |> and .|> #20

racinmat opened this issue Aug 19, 2020 · 3 comments

Comments

@racinmat
Copy link
Contributor

@pipe readdir("/a_dir") |> filter(x->endswith(x, ".a_suffix"), _) .|> joinpath(/a_dir, _)

is not working. Generates

(readdir("/a_dir") |> filter((x->begin
                    endswith(x, ".a_suffix")
                end), readdir("/a_dir"))) .|> (var"##379"->begin
            joinpath("/a_dir", var"##379")
        end)
@oxinabox
Copy link
Owner

I see, that extra readdir("/a_dir") |> at the start should not be there. I wonder what we messed up in #16 that makes it not remove that

@oxinabox
Copy link
Owner

this would effectively be resolved by solving #11 which would make all things become ... |> x->f(a,x)

@racinmat
Copy link
Contributor Author

Yes, that was my thought too, I'll probably soon get into benchmarks and if it will be good, it will be ... |> x->f(a,x) all the way and I hope it will solve the problem.

getzdan added a commit to getzdan/Pipe.jl that referenced this issue Nov 6, 2022
This needs to be reviewed to not cause any other glaring problems. But it does pass Package tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants