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 1

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

The Challenge Find the last element of a list. Test application Implement lastElement in this test application. module Main exposing (..) import Html exposing (text) import List import Maybe lastElement : List a -> Maybe a lastElement list = -- your implementation goes here Nothing main = case lastElement [1,2,3,4] of Just a -> text (toString a) Nothing -> text "No element found" Expected Result 4 Solutions