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 8

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

Write a function to remove consecutive duplicates of list elements. import Html exposing (text) import List compress : List a -> List a -- your implementation goes here main = text (toString (compress [1, 1, 2, 2, 3, 3, 3, 4, 5, 4, 4, 4, 4])) Result: [1, 2, 3, 4, 5, 4] Solutions