Writer monad and unsequence
问题 I am using the Writer monad to keep track of an error ("collision") flag on arbitrary values (such as Int ). Once the flag is set it is "sticky" and attaches itself to all values produced as a result of any operation with the marked one. Sometimes the collision flag is associated with individual values, sometimes I would like to associate with composite structures such as lists. Of course, once the collision flag is set for a whole list, it also makes sense to assume it is set for an