Skip to content

Instantly share code, notes, and snippets.

@devn
Created October 5, 2018 19:08
Show Gist options
  • Select an option

  • Save devn/edef1544815cfe2854a83ba257275fc9 to your computer and use it in GitHub Desktop.

Select an option

Save devn/edef1544815cfe2854a83ba257275fc9 to your computer and use it in GitHub Desktop.

Revisions

  1. devn created this gist Oct 5, 2018.
    15 changes: 15 additions & 0 deletions coinstar.clj
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    (ns coinstar
    (:import [java.time LocalDate]))

    (def working? (constantly false))

    (defn go
    "Provided a `who` and `when`, returns the state of
    a coinstar `when` the `who` goes to it.
    Example:
    (coinstar/go :i (LocalDate/now)) => false"
    [who when]
    {:pre [(and (= who :i)
    (instance? java.time.LocalDate when))]}
    (working?))