Skip to content

Instantly share code, notes, and snippets.

# If objects share object then it breaks Encapsulation
# A -> C
# B -> C
# A and B are sharing C state, breaking the encapsulation of parent Objects (A, B).
# Marionettes problem -
class Animal:
def __init__(self, name): = name
grierson / profiles.clj
Last active Mar 28, 2020
View profiles.clj
{:user {:plugins [[lein-ancient "0.6.15"]
[lein-midje "3.2.1"]
[lein-try "0.4.3"]]
:dependencies [[hashp "0.1.1"]
[vvvvalvalval/scope-capture "0.3.2"]]
:injections [(require 'sc.api)
(require 'hashp.core)]}}
View app.clj
(ns dorsia.core
(:require [ring.adapter.jetty :as jetty]
[ring.util.response :as resp]
[integrant.core :as ig]
[reitit.ring :as ring]))
;; Start Persistence
(defprotocol ReservationRepository
(create [this reservation] "Add reservation")