99 Elm Problems/Problem 6

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Determine if a list is a palindrome, that is, the list is identical when read forward or backward.

import Html exposing (text)
import List

isPalindrome : List a -> Bool
-- your implementation goes here

main = 
  isPalindrome [1,2,3,2,1] |> toString |> text

Result:

True

Solutions