Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

99 Elm Problems/Problem 12

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Decompress the run­-length encoded list generated in Problem 11. import Html exposing (text) import List type Item a = Single a | Multiple Int a decodeModified : List (Item a) -> List a -- your implementation goes here main = text <| toString <| decodeModified [Multiple 3 'a', Single 'b', Multiple 3 'c', Single 'd', Multiple 5 'e'] Result: ['a', 'a', 'a', 'b', 'c', 'c', 'd', 'e', 'e', 'e', 'e', 'e'] Solutions