I am trying to apply a function on each element of a list in haskell. Therefore I am using the map function.
My code should add the value of the next element to the current element.
So I think my code should look somehow like this:
test :: [Rational]
test = map (\x -> x % {-somehow get next element -}) listT
listT is an infinite list of type Int.
But how do I "access" the next value? Thx for your help