SyntaxFix
Write A Post
Hire A Developer
Questions
You can use !!, but if you want to do it recursively then below is one way to do it:
!!
dataAt :: Int -> [a] -> a dataAt _ [] = error "Empty List!" dataAt y (x:xs) | y <= 0 = x | otherwise = dataAt (y-1) xs