Add part2, clean up part1 some

This commit is contained in:
Richard Feldman
2018-08-05 07:19:09 -04:00
parent c247c24a23
commit 2163df4cb3
53 changed files with 5419 additions and 72 deletions

View File

@@ -0,0 +1,29 @@
module CommentId exposing (CommentId, decoder, toString)
import Json.Decode as Decode exposing (Decoder)
-- TYPES
type CommentId
= CommentId Int
-- CREATE
decoder : Decoder CommentId
decoder =
Decode.map CommentId Decode.int
-- TRANSFORM
toString : CommentId -> String
toString (CommentId id) =
String.fromInt id