Skip to main content
deleted 22 characters in body
Source Link
Ben Sprott
  • 1.3k
  • 14
  • 23

A Bag is a data structure, like a list, that stores items with no concept of order. The only operations on the structure is to add an item and then iterate through the items with no guarantee as to the order of iteration. We see it in Sedgewick's Algorithms book. This has to be a Monad, as it I am guessing this is a data structure, and it could be Comonad ormonad since it could not beis very much like the list monad. What is the Monad for the bag? Is it a Comonad?

A more technical and mathematical definition for a bag would be a set with finite multiplicities. What is the monad for that? Is that functor also a comonad with suitable natural transformations?

A Bag is a data structure, like a list, that stores items with no concept of order. The only operations on the structure is to add an item and then iterate through the items with no guarantee as to the order of iteration. We see it in Sedgewick's Algorithms book. This has to be a Monad, as it is a data structure, and it could be Comonad or it could not be. What is the Monad for the bag? Is it a Comonad?

A more technical and mathematical definition for a bag would be a set with finite multiplicities. What is the monad for that? Is that functor also a comonad with suitable natural transformations?

A Bag is a data structure, like a list, that stores items with no concept of order. The only operations on the structure is to add an item and then iterate through the items with no guarantee as to the order of iteration. We see it in Sedgewick's Algorithms book. I am guessing this is a monad since it is very much like the list monad. What is the Monad for the bag? Is it a Comonad?

A more technical and mathematical definition for a bag would be a set with finite multiplicities. What is the monad for that? Is that functor also a comonad with suitable natural transformations?

added 130 characters in body
Source Link
Ben Sprott
  • 1.3k
  • 14
  • 23

A Bag is a data structure, like a list, that stores items with no concept of order. The only operations on the structure is to add an item and then iterate through the items with no guarantee as to the order of iteration. We see it in Sedgewick's Algorithms book. This has to be a Monad, as it is a data structure, and it could be Comonad or it could not be. What is the Monad for the bag? Is it a Comonad?

A more technical and mathematical definition for a bag would be a set with finite multiplicities. What is the monad for that? Is that functor also a comonad with suitable natural transformations?

A Bag is a data structure, like a list, that stores items with no concept of order. The only operations on the structure is to add an item and then iterate through the items with no guarantee as to the order of iteration. We see it in Sedgewick's Algorithms book. This has to be a Monad, as it is a data structure, and it could be Comonad or it could not be. What is the Monad for the bag? Is it a Comonad?

A Bag is a data structure, like a list, that stores items with no concept of order. The only operations on the structure is to add an item and then iterate through the items with no guarantee as to the order of iteration. We see it in Sedgewick's Algorithms book. This has to be a Monad, as it is a data structure, and it could be Comonad or it could not be. What is the Monad for the bag? Is it a Comonad?

A more technical and mathematical definition for a bag would be a set with finite multiplicities. What is the monad for that? Is that functor also a comonad with suitable natural transformations?

added (monads) tag - if I missed something and it is not actually relevant to the question, feel free to revert my edit
Link
Martin Sleziak
  • 4.7k
  • 4
  • 35
  • 40
Source Link
Ben Sprott
  • 1.3k
  • 14
  • 23
Loading