Plaster
New
List
Login
text
default
anonymous
2023.02.12 10:57:36
There is one parameter that can be given when specifying a combination type: whether the methods are to be combined in forward or reverse order. In the case of daemon combination, this is not very useful. However, many combination types have only one type of method, and in that case the parameter is meaningful. Some examples of useful non-daemon combination types are: • Lisp OR Returns the first non-null value of a method. The method ordering parameter is meaningful. • Lisp AND Like OR but returns null if any of the methods returns null, else returns the value of the last method. • List Returns a list of the values returned by each method. • Inverse list Given as an argument the list produced by list type combination, calls each method with successive elements of the list. If several flavors contribute methods to a list type result, and also contribute methods to this type combination, then these methods get called with the value of the flavor's list type method. Thus, the list type message collects information from a set of several flavors, and inverse list type message "puts the information back". This is a nice example of a non-trivial use of method combination.
Raw
Annotate
Repaste
Edit