[plt-scheme] abstractions...

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Wed Oct 5 18:03:11 EDT 2005

Hi geb a wrote:
> Hello,
> 
> Can someone tell me why the two scheme expression
> below are equivalent?  I do not understand where map
> gets its function!  Thank you for your help ahead of
> time!
> 
> (apply
>  map
>  (list
>   list
>   (list 1 2 3 4)
>   (list 5 6 7 8)
>   (list 7 8 9 0)))
> 
> 
> (list 
>  (list 1 5 7)
>  (list 2 6 8)
>  (list 3 7 9)
>  (list 4 8 0))


(apply f (list 1 2 3))        = (f 1 2 3)
(apply f (list list 1 2 3))   = (f list 1 2 3)
(apply map (list list 1 2 3)) = (map list 1 2 3)
                               => '((1) (2) (3))

-- 
Jens Axel Søgaard









Posted on the users mailing list.