This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Select exposing (select) | |
import Dict exposing (Dict) | |
import Html exposing (Html, Attribute, text) | |
import Html.Attributes exposing (value) | |
import Html.Events exposing (on, targetValue) | |
import Json.Decode as Json | |
toDict : List ( a, String ) -> Dict String ( a, String ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defprotocol CRUD | |
(create [this entity]) | |
(get [this id]) | |
(save [this id updates]) | |
(delete [this id])) | |
(defn create-db [] | |
(let [db (ref {})] | |
(reify CRUD | |
(create [_ entity] |