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

upper case form, Λ

lower case form, λ :

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)
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.

Λ 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.

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!!
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}
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?

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


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.

Log in or register to write something here or to contact authors.