Skip to content
forked from FNj/Hose.jl

Hose.jl - when pipe is just not flexible enough

License

Notifications You must be signed in to change notification settings

spirosbax/Hose.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hose.jl

Build Status

Hose.jl is for the situations where pipe is just not flexible enough.

    @hose(expression)

The @hose macro processes its argument so that you pipe the left hand side (LHS) into functions of several arguments, macros, blocks, just index the LHS etc. The placeholder symbol for the LHS on the RHS is the underscore (_).

Examples:

    @hose a |> b(x, _) # produces b(x, a)
    @hose a |> _[b] # produces a[b]
    @hose a |> @testmacro _ b # equivalent of @testmacro(a, b)

Also behaves like Lazy.jl @> macro:

    @hose a |> b(x) # produces b(a, x)
    @hose a |> @testmacro # produces equivalent of @testmacro(a)

Standard piping works as well. For other examples see test/runtests.jl.

Kudos to Pipe.jl which I basically shamelessly forked for creating this package.

About

Hose.jl - when pipe is just not flexible enough

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%