Aviad
Aviad

Reputation: 3584

SCHEME | lambda vs λ?

I'm taking a SCHEME course, and I was wandering if there's any difference between writing "λ" or "lambda". To clarify, is there a functional difference between these two snippets ?

Using λ

(define foo
 (λ (x)
   (...)))

Using lambda

(define bar 
 (lambda (x)
  (...)))

Upvotes: 6

Views: 1040

Answers (1)

Sylwester
Sylwester

Reputation: 48745

λ is the lowercase symbol with the name lambda but most Scheme implementations doesn't have λ defined as a synonym for lambda. This the difference is that lambda is guaranteed to work while λ certainly is shorter for a teacher to write.

As an example I can mention that the wizards used λ quite often in the SICP videos even though the symbol wasn't supported. Whenever you see it you need to write lambda.

Upvotes: 8

Related Questions