Skip to content

Solutions and notes from the book Professional Clojure by Anderson, Gaare, Holguin, Bailey and Pratley

Notifications You must be signed in to change notification settings

petemak/profclojure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code and Excercises from Professional Clojure

cljbasics or ch1

Contains code from the initial chapter. Code handles basic concepts like

  • Principle of values
  • Referential transparency
  • Tail recursion .. loop/recur
  • Mutual recursion ... trampoline
  • High order functions
  • Partial funtions
  • Composition
  • Laziness
  • Atoms for synchronous uncordinated single state change
  • Refs for coordinated state change with multiple objectd
  • Defmulti defmethod for polymorhic dispatch
  • Deftype and Defrecord for descriptions and actions
  • Protocols for a named set of functions
  • Persistent data structures

ch2

Rapid feedback cycles.

  • REPL - basic use doc, find-doc, source, javadoc
  • REPL - starting a nREPL server and client with lein repl or lein repl :start :host localhost :port xxxxx
  • REPL - starting a headless nREPL server with lein repl :headless :host localhost :port xxxxx
  • REPL - connecting to server with lein repl :connect localhost:xxxxx
  • REPL - embedding REPL is server application with lein-ring plugin and :nrepl {:start? true}...
  • REPL - code reload with org.clojure/tools.namespace and :reload

ch3

Web Services. Utilising coljure features e.g. expressivenes, immutable data structures, concurrency and re-use to easily create web services.

  • Project structure with the compojure template: lein new compojure
  • Ring for HTTP abstraction
  • Compojure for routing
  • example-project works through ring and compojure concepts
  • ring-shortener summary project for CH3

About

Solutions and notes from the book Professional Clojure by Anderson, Gaare, Holguin, Bailey and Pratley

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published