[plt-scheme] 'complement'[?] of map

From: Filipe Cabecinhas (filcab at gmail.com)
Date: Sun Feb 17 15:13:17 EST 2008

On 17 Feb, 2008, at 15:33, Jos Koot wrote:

> I did not see compose in R6RS not in R6RS/lib, but it is likely to  
> be available in most Scheme implementations.


It's not in the standards (R5RS and R6RS) but in the standard's text,  
it's definition makes an appearence:

R5RS, page 32:

(define compose
   (lambda (f g)
     (lambda args
       (f (apply g args)))))

((compose sqrt *) 12 75)
⇒ 30

I think R6RS also has this definition in the text. It's not as  
powerful as the one that deals with multiple arguments but it's nice  
and works in many cases.


F



Posted on the users mailing list.