Changes between Version 79 and Version 80 of Clojure Client Tutorial


Ignore:
Timestamp:
Aug 25, 2011 4:34:26 PM (13 years ago)
Author:
kedwar10
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Clojure Client Tutorial

    v79 v80  
    131131}}}
    132132
    133 In this case, counter "closes" over the a lexical variable "a" and prevents it from going out of scope.
     133In this case, counter "closes" over the a lexical variable "a" and prevents it from going out of scope. A useful feature of closing over a variable with a function is that you can sometimes eliminate the need to maintain global data structures for your program.  The API for the client, for example, when it loads a quagent into the environment, creates a new socket and then closes over it with methods that read and write messages to the server.  As a consequence, there is no need to explicitly store the connection information anywhere, and code is simplified considerably.
    134134
    135135=== Basic Functionality ===