# \[ANN\] LambdaFn.jl

**URL:** <https://discourse.julialang.org/t/ann-lambdafn-jl/28054>\
**Category:** Package Announcements\
**Created:** [August 27, 2019, 5:44pm UTC](https://discourse.julialang.org/t/ann-lambdafn-jl/28054 "2019-08-27T17:44:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haberdashPI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/haberdashpi/32/26337_2.png) [@haberdashPI](https://discourse.julialang.org/u/haberdashPI)\
**Post date:** [August 27, 2019, 5:44pm UTC](https://discourse.julialang.org/t/ann-lambdafn-jl/28054/1 "2019-08-27T17:44:43Z")

</div>

Hi all,

I have created the following, very small, package: [LambdaFn.jl](https://github.com/haberdashPI/LambdaFn.jl). It’s for creating anonymous functions in a way I find to be handy.

It’s best explained by example:

```julia
using LambdaFn

@λ(_ + _) # == (x,y) -> x+y
@λ(_a*_b + _a) # == (a,b) -> a*b + a
@λ(_2 - _1) # == (_1,_2) -> _2 - _1
@λ(_1 - _3) # == (_1,_2,_3) -> _1 - _3
filter(@λ(_.value > 10),data) # == filter(x -> x.value > 10,data)
1:10 |> @λ(filter(@λ(_ > 3),_)) == 4:10   

```

Very similar in spirit to this [PR](https://github.com/JuliaLang/julia/pull/24990), but it’s a little different. I welcome any feedback.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [August 28, 2019, 5:40am UTC](https://discourse.julialang.org/t/ann-lambdafn-jl/28054/2 "2019-08-28T05:40:07Z")

</div>

I like it! I have alwasy found `(x,y)->h(f(x)+g(y))` to be cumbersome! You can type `λ` with \lambda

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 28, 2019, 6:06am UTC](https://discourse.julialang.org/t/ann-lambdafn-jl/28054/3 "2019-08-28T06:06:04Z")

</div>

Thanks for doing this! Experimenting with this syntax in a package is the perfect way to explore it.
