Allow imported functions in Filter, Map and Reduce
The Filter
, Map
and Reduce
accept currently either a Lambda
expression or a reference to FunctionDefinition
:
( lambda_ = Lambda | function = [FunctionDefinition] )
To allow using imported external functions, this should be generalized to
( lambda_ = Lambda | function = [Function] )
or even safer (see FunctionCall
rule):
( lambda_ = Lambda | function = [Function|TrueID] )
A test should be added to the test set to test Filter
, Map
and Reduce
with an imported library function.
BTW: The current tests for Filter
, Map
and Reduce
cover only only Lambda
but do not cover the possible case of FunctionDefinition
.
Edited by Ivan Kondov