Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Last active March 31, 2018 14:29
Show Gist options
  • Select an option

  • Save Chadtech/52733d5c941be3aa95d5d5736ada6f83 to your computer and use it in GitHub Desktop.

Select an option

Save Chadtech/52733d5c941be3aa95d5d5736ada6f83 to your computer and use it in GitHub Desktop.
import Return2 as R2
import Return3 as R3
-- Return 2 --
R2.withCmd : Cmd msg -> model -> (model, Cmd msg)
R2.withCmds : List (Cmd msg) -> model -> (model, Cmd msg)
R2.withNoCmd : model -> (model, Cmd msg)
R2.withModel : model -> Cmd msg -> (model, Cmd msg)
R2.model : (model, Cmd msg) -> model
R2.cmd : (model, Cmd msg) -> Cmd msg
R2.addCmd : Cmd msg -> (model, Cmd msg) -> (model, Cmd msg)
R2.mapCmd : (a -> b) -> (model, Cmd a) -> (model, Cmd b)
R2.mapModel : (a -> b) -> (a, Cmd msg) -> (b, Cmd msg)
R2.incorporate : model -> (subModel -> model -> model) -> (subModel, Cmd msg) -> (model, Cmd msg)
-- Return 3 --
R3.withReply : reply -> (model, Cmd msg) -> (model, Cmd msg, reply)
R3.withNoReply : (model, Cmd msg) -> (model, Cmd msg, reply)
R3.withTuple : (model, Cmd msg) -> reply -> (model, Cmd msg, reply)
R3.model : (model, Cmd msg, reply) -> model
R3.cmd : (model, Cmd msg, reply) -> Cmd msg
R3.reply : (model, Cmd msg, reply) -> reply
R3.addCmd : Cmd msg -> (model, Cmd msg, reply) -> (model, Cmd msg, reply)
R3.mapCmd : (a -> b) -> (model, Cmd a, reply) -> (model, Cmd b, reply)
R3.mapModel : (a -> b) -> (a, Cmd msg, reply) -> (b, Cmd msg, reply)
R3.incorporate : model -> (subModel -> reply -> model -> (model, Cmd msg)) -> (subModel, Cmd msg, reply) -> (model, Cmd msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment