项目作者: c42f

项目描述 :
Underscore placeholders for convenient closure syntax
高级语言: Julia
项目地址: git://github.com/c42f/Underscores.jl.git
创建时间: 2020-03-20T15:12:45Z
项目社区:https://github.com/c42f/Underscores.jl

开源协议:MIT License

下载


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

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

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