Paste: selector record

Author: j
Mode: text
Date: Tue, 12 Oct 2010 10:00:39
Plain Text |
procedure SelectorIdentifier;
procedure SelectorReturnType;
procedure SelectorArgumentTypes;
Selector?(T) = CallDefined?(SelectorIdentifier, Static[T])
    and CallDefined?(SelectorReturnType, Static[T])
    and CallDefined?(SelectorArgumentTypes, Static[T]);

[I | Identifier?(I)]
selector(name: I, ReturnType, ...ArgumentTypes) = recordWithProperties(
    (
        (SelectorIdentifier, name),
        (SelectorReturnType, ReturnType),
        (SelectorArgumentTypes, Tuple(...ArgumentTypes))
    )
);

New Annotation

Summary:
Author:
Mode:
Body: