Changes between Version 65 and Version 66 of Clojure Client Tutorial


Ignore:
Timestamp:
Aug 22, 2011 11:44:03 AM (13 years ago)
Author:
kedwar10
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Clojure Client Tutorial

    v65 v66  
    3030
    3131Lisp and Scheme resources:
    32 * The Little/Seasoned/Reasoned Schemer (very gentle introduction to scheme).
     32* The Little / Seasoned / Reasoned Schemer (gentle introductions to scheme).
    3333* How To Design Programs [[http://www.htdp.org/]] (introduction to scheme and programming).
    3434* Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp, by Peter Norvig (introduction to lisp and AI).
     
    4343* If you define a record in a namespace and wish to access it in another, you must explicitly import it with the ":import" keyword in your namespace declaration.
    4444* Giving names to your anonymous functions will dramatically increase the usefulness of clojure error reporting (an example: (fn identity [x] x).  Doing this will also allow the function to call itself.
    45 * If you want to ensure tail cail optimization, use the "recur" function instead of using your function name.  "recur" also works with loops.
     45* If you want to ensure tail-call optimization, use the "recur" function instead of using your function name.  "recur" also works with loops.
    4646* "Weird" error messages usually result from forgetting to specify the arguments during a function definition or from mismatched parenthesis.
    47 * Atoms are your go-to way to manage state.
    48 * The function that you pass as an argument to swap! must be pure.  This is because the update to the atom is retriable so it may get called more then once.
     47* Atoms are your go-to way to manage state.  (Don't ignore the other types however, as choosing the inappropriate type can force a refactoring later on.)
     48* The function that you pass as an argument to "swap!" (the function that updates an atom) must be pure.  This is because the update to the atom is retriable so it may get called more then once.
    4949* If you must define a type, prefer the simplest option.  A decision flowchart: [http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/].
    5050* If a future fails silently, try just running your function in a regular thread instead.