Unicode lambda revisited Lassi Kortela 14 Aug 2021 09:45 UTC

> (BTW, if "lambda" is too long to write---I'm using ^ in place of
> lambda and it's quite handy.  Of course, these days, λ is another
> plausible choice.

Is Scheme portability at a good enough level that we could now do a
trivial SRFI for Unicode lambda?

(define-library (srfi nnn)
   (export λ)
   (import (scheme base))
   (begin (define-syntax λ (syntax-rules () ((λ . rest) (lambda . rest))))))

The nice thing about the lambda character is, it's one Unicode
codepoint, so it's oblivious to which normalization form is being used.
Using Python 3:

 >>> unicodedata.normalize("NFC", "λ").encode("UTF-8")
b'\xce\xbb'
 >>> unicodedata.normalize("NFD", "λ").encode("UTF-8")
b'\xce\xbb'
 >>> unicodedata.normalize("NFKC", "λ").encode("UTF-8")
b'\xce\xbb'
 >>> unicodedata.normalize("NFKD", "λ").encode("UTF-8")
b'\xce\xbb'