AbstractionsΒΆ

Lambda functions in Shen can be written in classical form. (lambda X X) is the identity function; also written (/. X X). The latter notation allows a shorthand; (lambda X (lambda Y Y)) can be written (/. X Y Y).

Abstractions evaluate within Shen to closures; as do partial applications.

(1-) (/. X X)
#<FUNCTION :LAMBDA (X) X>

(2-) (* 7)
#<FUNCTION :LAMBDA (#:Y18379) (multiply #:Y18378 #:Y18379)>

The exact form in which the closure is printed is platform dependent.