[plt-scheme] Understanding lambda

 From: Marco Morazan (morazanm at gmail.com) Date: Fri Feb 13 17:28:49 EST 2009 Previous message: [plt-scheme] Understanding lambda Next message: [plt-scheme] Understanding lambda Messages sorted by: [date] [thread] [subject] [author]

```On Fri, Feb 13, 2009 at 3:32 PM, aditya shukla
> Thanks for the help guys , so now i know that  in (define f (lambda(x) (+(*
> 3 x) 5)))  value of f is a function returned by the lambda expressions.

What is f?

f is a function with one parameter called x.

> so
> when i do ( f 1)  or anything as in (f 55) then what are 1 or 55  in this
> expression , constants or functions?
>

1 and 55 are the values of x for the two different applications of f
to an argument (i.e. (f 1) and (f 55)). When you apply f to 1 (i.e. (f
1) ), x takes the value of 1. When you apply f to 5 (i.e. (f 55) ), x
takes the value of 55.

Forget Scheme syntax for a second.

f(x) = 3x + 5

Consider f(1) and f(55).

I hope that clears it up.

--

Cheers,

Marco

```

 Posted on the users mailing list. Previous message: [plt-scheme] Understanding lambda Next message: [plt-scheme] Understanding lambda Messages sorted by: [date] [thread] [subject] [author]