Skip to content

Instantly share code, notes, and snippets.

@grrinchas
Last active December 19, 2017 01:29
Show Gist options
  • Save grrinchas/403faac01f0e17c7762b49dfa776c829 to your computer and use it in GitHub Desktop.
Save grrinchas/403faac01f0e17c7762b49dfa776c829 to your computer and use it in GitHub Desktop.
module Models exposing (..)
import Lorem
type alias Post =
{ id: String
, title : String
, body : String
}
type alias Model =
{ posts: List Post
}
initialPost : String -> Post
initialPost id =
{ id = id
, title = Lorem.sentence 4
, body = Lorem.paragraphs 2 |> String.concat
}
initialModel : Model
initialModel =
{ posts = List.range 1 10 |> List.map toString |> List.map initialPost
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment