Skip to main content

  | मौसम…

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

411 REFERENCE · Wikibooks

99 Elm Problems/Lists/Problem 1/Find the last element of a list

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

Find the last element of a list. Example in Elm: import Graphics.Element exposing (show) import List import Maybe myLast : List a -> Maybe a -- your implementation goes here main = case myLast [1,2,3,4] of Just a -> show a Nothing -> show "No element found" Result: 4 Solutions