jan tolenaar / kiezellisp / index-of-everything

Name

?

Usage

builtin-function

Syntax

(? member)

Description

Returns a function to access a member of an arbitrary object allowing for null reference, e.g. (? "to-upper"). This is usually written as ?to-upper and expanded by the lisp reader to the former expression.

make-html > (?to-upper "hello")
it: "HELLO"
make-html > (let obj (new :name "piet"))
it: obj
make-html > (?to-upper (.name obj))
it: "PIET"
make-html > (?to-upper (.city obj))
it: null
make-html > (.to-upper (.city obj))
Cannot invoke a method on a null reference: System.Object.ToUpper(System.Object:null)