Eric Bezault wrote:
> It would be nice to be able to write:
>
> my_container.do_if (agent some_action, agent some_criterion1 and
> agent some_criterion2)
I believe this is a particular case of a more general form when one agent
can be called on the result of the other one or can be used to evaluate
an argument of the other one. For example, if we have
f: X
and in class X
g: Y
then class FUNCTION could provide an operator * so that we can write
agent f * agent {X}.g
This operator returns an agent that when called, invokes the feature f
and then uses its result to invoke a feature g.
PROCEDURE could provide a bracket operator, so that we can write
agent h [agent f]
given that h is declared as
h (a: X) ...
Here the resulting agent calls h with an argument that is a result of the call of the
feature f.
If we have such combinators the boolean operator mentioned above is a shortcut to
agent {BOOLEAN}.conjunction [agent some_criterion1, agent some_criterion2]
and can be implemented this way in the class PREDICATE.
Most probably the mentioned constructs are not ready-to-be-used, as there are
some details that involve resolution of open arguments when multiple agents
are combined into a signle one, but it let's to see the idea.
Regards,
Alexander Kogtenkov
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at:
http://p.sf.net/sfu/Challenge_______________________________________________
freeelks-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freeelks-devel