-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
I like it! (Better than I like my own package LambdaFn). Thanks for putting this together!
It occurred to me that, since this is a macro, you should be able to rewrite piping expressions to treat functions as if they have a curried version.
That is:
@_ data |> filter(_>10) |> map(_+1)Could be re-written as:
data |> x -> filter(a -> a > 10, x) |> x -> map(a -> a +1,x)The rule could be that if the top-level expression after |> is a function call, rewrite the expression to be a function that takes a single argument and passes it as the final argument of this top-level expression.
Maybe that should be a separate macro (@_> @|>, @|>_ ??). It is essentially a combination of your macro @_ and the @>> macro from Lazy.jl.
Metadata
Metadata
Assignees
Labels
No labels