Sorry, I meant that the Shen code generator should be able to determine which procedures are pure mathematical functions - e.g. with no side effects, like system I/O, that would break certain laws like associativity. Pure functions can be called by the system less (maybe via sub expression elimination), or more than specified, without causing strange behavior. It's a useful property if you want to do "algebraic computing" and also gives extra optimization information for code generating back-ends (see
https://lwn.net/Articles/285332/).
Monoids appear frequently, and are quite useful and easy to understand (see
http://apfelmus.nfshost.com/articles/monoid-fingertree.html)
On a separate topic, Its also interesting to consider how different data structures act when used as the fundamental control structure for a programming language. List worship gives you lisp. Stacks yield concatenative languages / Forth. What strange language would lattices produce? Maybe it could be interesting for parallel computing or combinatorial problems.