Hello,

For the 'curry' macro I posted yesterday, I had to define 'symbol<?':

(define (symbol<? a b)
  (string<? (symbol->string a)
            (symbol->string b)))

Awhile back, I posted to c.l.s regarding my exploring
"concatenative combinators" within Scheme. One of those combinators is
'bi@'. I noticed that the above would just be:

    (define symbol<? (bi@ symbol->string string<?))

A simple definition for bi@ is:

(define (bi@ f c)
  (lambda (x y)
    (c (f x)
       (f y))))

I say "simple" because the definitions in my posts had some more complex
versions of these combinators; perhaps I can get away with using simpler
 versions like this.

Anyway, I think a general version of the above is:

(define-syntax n@
  (syntax-rules ()
    ( (n@ (parameter ...) procedure c)
      (lambda (parameter ...)
        (c (procedure parameter)
           ...
           )) )))

Ed

Reply via email to