Accesy haskell list element

To access an element in a Haskell list, you can use indexing with the !! operator. The index starts from 0, so the first element in the list has an index of 0, the second element has an index of 1, and so on. The syntax to access an element is list !! index. Here's an example:

myList = [1, 2, 3, 4, 5]
element = myList !! 2

In this example, myList !! 2 will return the third element of the list myList, which is 3.