Tutorial by Examples

type Dog = Dog String dogName1 dog = case dog of Dog name -> name dogName2 (Dog name) -> name dogName1 and dogName2 are equivalent. Note that this only works for ADTs that have a single constructor. type alias Pet = { name: String , weight: Float ...
type ProjectIdType = ProjectId String getProject : ProjectIdType -> Cmd Msg getProject (ProjectId id) = Http.get <| "/projects/" ++ id

Page 1 of 1