Add part6

This commit is contained in:
Richard Feldman
2018-08-11 18:22:37 -04:00
parent b76a1f17e9
commit 8f67672ffe
55 changed files with 5971 additions and 0 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