[Haskell-cafe] Is there a name for this algebraic structure?
Gleb Peregud
gleber.p at gmail.com
Mon Apr 20 21:12:00 UTC 2015
Hello
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?
Cheers,
Gleb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150420/c289a8a9/attachment.html>
More information about the Haskell-Cafe
mailing list