Skip to content

@aside like Chain.jl #136

@rben01

Description

@rben01

Lazy.jl’s threading macros are nice, but as far as I can tell there is no way to “skip over” a line so that it runs without having its output fed into the next line. Chain.jl has the very handy @aside macro for this purpose. It would be nice if something similar could be added to Lazy.jl. Currently I hack around this with

@as y x begin
    f(y)
    g(y)
    y |> function(z)
        side_effect(z)  # this is where I'd like to use @aside
        return z  # this is just y
    end
    h(y)
end

I'd much prefer just

@as y x begin
    f(y)
    g(y)
    @aside side_effect(y)
    h(y)
end

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