lambda

"lambda" is also a: user

(thing) by N-Wing (6 d) (print)   (I like it!) Mon Dec 06 1999 at 14:37:38

"lambda" is the 11th letter of the Greek alphabet.

upper case form, Λ

lower case form, λ :

(idea) by neil (2.6 hr) (print)   (I like it!) Thu Jun 15 2000 at 15:08:47
In lambda calculus, Lisp, scheme, and haskell, lambda is used to create an abstraction---that is, an unnamed function. For example, the function which computes the square of its argument may be written as:
\lambda x . * x x (in lambda calculus, assuming * has been defined)
(lambda (x) (* x x)) (in Lisp and scheme)
\ x -> (x * x) (in haskell).
In ML, lambda is called `fn':
fn x => (x * x)
(thing) by Randofu (2.2 y) (print)   (I like it!) Sun Jul 01 2001 at 18:22:34
Also, one of the lesser-known gay pride symbols. Like a Pink Triangle or a Rainbow Flag. Lambda used to be my friend's favorite greek letter, until one day I told him that it was a gay symbol.

Also, it is the inspiration for the chain of gay book stores, Lambda Rising.

(idea) by vagary (4.2 y) (print)   (I like it!) Mon Jul 02 2001 at 21:29:13

Λ is used in Computer Science as the null string in regular expression syntax. This led to its use for "free" edges in non-deterministic transition graphs.1


1: This leds to the evils of Λ-loops and Λ-circuits which are allowed in favour of rule simplicity but can be removed without changing the behaviour of the transition graph.

(thing) by theshovel (6.4 y) (print)   (I like it!) Wed Feb 06 2002 at 9:24:22
The most bad-ass procedure in scheme has to be lambda. This procedure itself returns a procedure. In scheme whenever a procedure is made, the scheme interpreter uses lambda like this: What you would normally enter:

(define (square x) (* x x))

What the interpreter does (and you can do yourself if you like):

(define square (lambda (x) (* x x)))

In the second example, the variable square is bound to the return value of lambda which is a procedure that takes one argument and returns its square.

(define (make-every-proc proc) (lambda (a) (every proc a)))

(define every-bf (make-every-proc butfirst))

(every-bf '(hello you crazy world)) ==> (ello ou razy orld)

I defined the procedure make-every-proc that takes in a procedure, proc and returns a procedure, (unnamed), that takes in a sentence and applies proc to every element. You can see how this works now. Good Stuff. GO CAL!!
(idea) by Brian Feldman (5 y) (print)   (I like it!) Sun Apr 14 2002 at 22:04:11
As an addendum to the previous examples, the way to explicitly create a closure in Ruby is to use the syntax
closure = lambda {|x| x + x}
or
closure = Proc.new {|x| x + x}
For example,
lambda {|x| x + x}.call 2 would return 4
Of course, the neatest part about it is that there's nothing special about the lamba function that makes it necessary to create closures with! You could even create your own closure-creation method, like so:
def my_lambda(&block)
  raise ArgumentError, "tried to create Procedure-Object without a block" if !block_given?
  block
end
(definition) by Webster 1913 (print) Wed Dec 22 1999 at 0:47:23

Lamb"da (?), n. [NL., fr. Gr. .]

1.

The name of the Greek letter

2. Anat.

The point of junction of the sagittal and lambdoid sutures of the skull.

Lambda moth Zool., a moth so called from a mark on its wings, resembling the Greek letter lambda (

 

© Webster 1913.

Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.