This is how I understand it. Think about the functions that follow the parenthesis icon, for example
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r
These functions take a function as an argument and return the return value of this function. atomicModifyIORef similar to this. It takes a function as an argument, and the goal is to return the return value of that function. There is only one complication: the argument function also returns a new value that must be stored in IORef . Because of this, atomicModifyIORef requires this function to return two values. Of course, this case is not exactly analogous to the case of brackets (for example, there is no IO , we are not dealing with exception safety, etc.), but this analogy gives you an idea.
safsaf32
source share