This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
withOnStateChangeSub : (model -> Cmd msg) -> (msg -> model -> ( model, Cmd msg )) -> msg -> model -> ( model, Cmd msg ) | |
withOnStateChangeSub statePort update msg model = | |
let | |
( updatedModel, cmd ) = | |
update msg model | |
updatedCmd : Cmd msg | |
updatedCmd = | |
if updatedModel == model then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####<title> | |
---- | |
**URL** | |
<url> | |
**Methods** | |
`<method>`|`<method>` | |
**Data Params** | |
<body> | |
**Success Response** | |
<json_resp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unique : List a -> List a | |
unique list = | |
case list of | |
[] -> | |
[] | |
x :: [] -> | |
x :: [] | |
x :: xs -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import List exposing (..) | |
flatten2D : List (List a) -> List a | |
flatten2D list = | |
foldr (++) [] list | |
-- SAMPLE | |
flatten2D [[1,2],[3,4],[1,1]] == [1,2,3,4,1,1] |
NewerOlder