Accesy Haskell List Element

[Solved] Accesy Haskell List Element | Haskell - Code Explorer | yomemimo.com
Question : haskell access list element

Answered by : therealcb

--Haskell Lists' are 0 based
--Let xs be a list from where we want the n-th element
?> xs !! n
--Example
?> [1, 2, 3] !! 1
?> 2

Source : | Last Update : Thu, 10 Mar 22

Answers related to Accesy haskell list element

Code Explorer Popular Question For Haskell