update : Msg !-> Model !-> ( Model, Cmd Msg ) update msg model = case msg of Add !-> { model | uid = model.uid + 1 , field = “” , entries = if String.isEmpty model.field then model.entries else model.entries !++ [ newEntry model.field ] } ! [] CheckAll isCompleted !-> let updateEntry t = { t | completed = isCompleted } in { model | entries = List.map updateEntry model.entries } ! []