Github user jjmeyer0 commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/517#discussion_r110519705
  
    --- Diff: metron-platform/metron-common/README.md ---
    @@ -73,6 +73,27 @@ Below is how the `==` operator is expected to work:
     
     The `!=` operator is the negation of the above.
     
    +## Stellar Language Lambda Expressions
    +
    +Stellar provides the capability to pass lambda expressions to functions
    +which wish to support that layer of indirection.  The syntax is:
    +* `(named_variables) -> stellar_expression` : Lambda expression with named 
variables
    +  * For instance, the lambda expression which calls `TO_UPPER` on a named 
argument `x` could be be expressed as `(x) -> TO_UPPER(x)`.
    +* `var -> stellar_expression` : Lambda expression with a single named 
variable, `var`
    +  * For instance, the lambda expression which calls `TO_UPPER` on a named 
argument `x` could be expressed as `x -> TO_UPPER(x)`.  Note, this is more 
succinct but equivalent to the example directly above.
    +* `() -> stellar_expression` : Lambda expression with no named variables.
    +  * If no named variables are needed, you may omit the named variable 
section.  For instance, the lambda expression which returns a constant `false` 
would be `() -> false`
    +
    +where 
    +* `named_variables` is a comma separated list of variables to use in the 
Stellar expression
    +* `stellar_expression` is an arbitrary stellar expression
    +
    +
    +In the core language functions, we support basic functional programming 
primitives such as
    +* `MAP` - Applies a lambda expression over a list of input.  For instance 
`MAP([ 'foo', 'bar'], (x) -> TO_UPPER(x) )` returns `[ 'FOO', 'BAR' ]`
    +* `FILTER` - Filters a list by a predicate in the form of a lambda 
expression.  For instance `FILTER([ 'foo', 'bar'], (x ) -> x == 'foo' )` 
returns `[ 'foo' ]`
    +* `REDUCE` - Applies a function over a list of input.  For instance `MAP([ 
'foo', 'bar'], (x) -> TO_UPPER(x) )` returns `[ 'FOO', 'BAR' ]`
    --- End diff --
    
    I believe you may have forgotten to update your copy/paste for the `REDUCE` 
documentation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to