© Thomas Mailund 2018

Thomas Mailund, Domain-Specific Languages in R, https://doi.org/10.1007/978-1-4842-3588-1_6

6. Lambda Expressions

Thomas Mailund

(1)Aarhus N, Staden København, Denmark

With the techniques we have seen so far, we are now able to implement some useful domain-specific languages. In this chapter, we examine a toy example, lambda expressions. It is perhaps not something we would use in real-world code, as it simply gives an alternative syntax to anonymous functions, which are already supported in R. However, it is an excellent example of code that is potentially useful and gives us a chance to experiment with syntax.

We will use the rlang package.


Anonymous functions

Lambda expressions are Anonymous functions, in other ...

Get Domain-Specific Languages in R: Advanced Statistical Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.