[Haskell-cafe] Is there a name for this algebraic structure?
gleber.p at gmail.com
Mon Apr 20 21:12:00 UTC 2015
I am wondering if there's a well known algebraic structure which follows
the following patterns. Let's call it S:
It's update-able with some opaque "a" (which can be an element or an
operation with an element):
update :: S -> a -> S
There's a well defined zero for it:
empty :: S
Operations on it are idempotent:
update s a == update (update s a) a
Every S can be reconstructed from a sequence of updates:
forall s. exists [a]. s == foldl update empty [a]
An example of this would be Data.Set:
empty = Set.empty
update = flip Set.insert
Is there something like this in algebra?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe