I am confused by the lazy concept.
I am new to Haskell and I met the httpLBS
function in the Network.HTTP.Simple
module, which says:
Perform an HTTP request and return the body as a lazy ByteString. Note that the entire value will be read into memory at once (no lazy I/O will be performed). The advantage of a lazy ByteString here (versus using httpBS) is--if needed--a better in-memory representation.
What is the value? Is it the entire response? If the entire response is in memory then what is the point of a lazy byte string here? How does this work? What is the difference between the lazy IO and lazy byte string?