Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 865 Bytes

2013-04-16-book-problems.md

File metadata and controls

30 lines (20 loc) · 865 Bytes

Clojure

Day 1: Training Luke

Find

  • Examples using Clojure sequences
  • The formal definition of a Clojure function
  • A script for quickly invoking the repl in your environment

Do

  • Implement a function called (big st n) that returns true if a string st is longer than n characters.
  • Write a function called (collection-type col) that returns :list, :map, or :vector based on the type of collection col.

Day 2: Yoda and the Force

Find

  • The implementation of some of the commonly used macros in the Clojure language
  • An example of defining your own lazy sequence

Do

  • The current status of the defrecord and protocol features (these features were still under development as this book was being developed) Do:
  • Implement an unless with an else condition using macros.
  • Write a type using defrecord that implements a protocol.