Skip to content

Instantly share code, notes, and snippets.

@ufocoder
Created April 8, 2018 12:38
Show Gist options
  • Save ufocoder/a16adecec36c6931cc091e7ac4ec6458 to your computer and use it in GitHub Desktop.
Save ufocoder/a16adecec36c6931cc091e7ac4ec6458 to your computer and use it in GitHub Desktop.
elm.tasks.elm
-- Tuple
("oh", ("my", (42, "god"))) -- touch the God
(("Hello", 100), ("World", 200)) -- need "Hello World 300"
((((((("Boom has been planted"))))))) -- tuple?
-- Record
myRecord =
{ firstName = "Evan"
, lastName = "Czaplicki"
, job = {
company = "prezi.com",
position = "developer"
}
}
-- update company "www.noredink.com"
-- List
['a', 'b', 'c'] --- "abc"
["Who", "are", "you", "without", "concatinate", "?"] -- convert to string
items =
[ ("key1", {fleet_counts = [1, 2, 3]})
, ("key2", {fleet_counts = [1, 2, 3]})
, ("key3", {fleet_counts = []})
]
{-
processItems items =
items
|> List.map Tuple.second
|> List.concatMap .fleet_counts
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment