William Tanksley wrote:

> I have a question for the more historically literate than myself:
> would these more accurately be called "FP combinators" rather than
> "concatenative combinators"? My understanding is that this combinator
> style originated with the applicative FP/FL languages.

Hi William,

This style is definately close to FP, FL etc. (For those interested in 
FP check out the "Furry Paws" FP compiler.)

FP's "construction" operator is like Factor's 'cleave', but closer to a 
"cleave to array".

I listed 'bi' as:

(define (bi f g c)
    (lambda (x)
      (c (f x)
         (g x))))

What about 'cleave' in Scheme? As a macro it's:

(define-syntax cleave
   (lambda (stx)
     (syntax-case stx ()
       ( (cleave (f ...) c)
         (with-syntax (((x ...) (generate-temporaries (syntax (f ...)))))
           (syntax
            (lambda (x ...)
              (c (f x)
                 ...)))) ))))

> ((cleave (sqrt sin cos) list) 4 0 0)
(2 0 1)
>

Ed


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to