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 2

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

Problem 2: Implement the function penultimate to find the next to last element of a list. import Html exposing (text) import List import Maybe penultimate : List a -> Maybe a -- your implementation goes here main = case penultimate (List.range 1 4) of Just a -> text (toString a) Nothing -> text "No element found" Result: 3 Solutions