     \ >r <repetition> >quotation -rot
     \ r> <repetition> >quotation 3append ;
 
-: make-prepare-send ( selector method super? -- quot )
+MEMO: make-prepare-send ( selector method super? -- quot )
     [
         [ \ <super> , ] when
         swap cache-selector , \ selector ,

USING: alien alien.c-types alien.compiler
arrays assocs combinators compiler inference.transforms kernel
math namespaces parser prettyprint prettyprint.sections
quotations sequences strings words cocoa.runtime io macros ;
IN: cocoa.messages

: make-sender ( method function -- quot )

    swap second length 2 - make-dip ;

MACRO: (send) ( selector super? -- quot )
    >r dup lookup-method r>
    [ make-prepare-send ] 2keep
    super-message-senders message-senders ? get at
    [ slip execute ] 2curry ;

: send ( args... receiver selector -- return... ) f (send) ; inline

