![]() |
|
|
NLI: Function: it Background: NLI, Expressions, Functions Related: Examples Description: The it function refers to the last thing created by the new function in a prior scope. In the example below, the first it in outer scope refers to john and the second it in inner scope refers to mary. General Format: (it) Examples:
(; Create a person named john who likes a person named mary who hates him)
(new)
(set person instance (it))
(set (it) name 'john)
(set (it) like (block (new)
(set person instance (it))
(set (it) name 'mary)
(set (it) hate john)
(it)
)
)
Notes: |