Underscores.jl

Underscore placeholders for convenient closure syntax
Popularity
83 Stars
Updated Last
5 Months Ago
Started In
March 2020

Underscores

Stable Docs Dev Docs Build Status

Underscores provides a macro @_ for passing closures to functions by interpreting _ placeholders as anonymous function arguments. For example @_ map(_+1, xs) means map(x->x+1, xs).

Underscores is useful for writing anonymous functions succinctly and without naming the arguments. This is particular useful for data processing pipelines such as

@_ people |> filter(_.age > 40, __) |> map(_.name, __)

Read the documentation for more information, or see the online help for the @_ macro.

Required Packages

No packages found.