foam.CLASS({
  package: 'foam.demos.u2.mlang',
  name: 'Demo',
  extends: 'foam.u2.Element',
  requires: [
    'foam.dao.EasyDAO',
    'foam.u2.mlang.Table',
    'foam.u2.mlang.Pie',
    'foam.u2.mlang.Sequence',
    'foam.mlang.sink.Count',
  ],
  implements: [
    'foam.mlang.Expressions',
  ],
  properties: [
    {
      class: 'foam.dao.DAOProperty',
      name: 'dao',
      factory: function() {
        return this.EasyDAO.create({
          of: this.Person,
          daoType: 'MDAO',
          seqNo: true,
        });
      },
    },
  ],
  classes: [
    {
      name: 'Person',
      properties: [
        { name: 'id' },
        { class: 'String', name: 'name' },
        { class: 'String', name: 'sex', value: 'M' },
        { class: 'Int', name: 'age' },
      ]
    },
  ],
  methods: [
    function initE() {
      this.SUPER();

      var GROUP_BY = this.GROUP_BY.bind(this);
      var COUNT = this.COUNT.bind(this);
      var Person = this.Person;

      var PIE = function(arg1) {
        return this.Pie.create({
          arg1: arg1,
          arg2: this.Count.create(),
        })
      }.bind(this);

      var SEQ = function() {
        return this.Sequence.create({
          data: Array.from(arguments),
        })
      }.bind(this);

      var TABLE = function() {
        return this.Table.create({
          columns: Array.from(arguments)
        });
      }.bind(this);

      var sink = GROUP_BY(Person.NAME, SEQ(COUNT(), PIE(Person.SEX)));
      this.dao.pipe(sink);

      var tableSink = TABLE('name', 'age', 'sex')
      this.dao.pipe(tableSink)

      this.
        startContext({ data: this }).
          add(this.ADD_PERSON).
        endContext().
        start('table').
          addClass(this.myClass('table')).
          start('tr').
            addClass(this.myClass('table')).
            start('td').
              addClass(this.myClass('table')).
              start('pre').
                add(`TABLE('name', 'age', 'sex')`).
              end().
              add(tableSink).
            end().
            start('td').
              addClass(this.myClass('table')).
              start('pre').
                add(`GROUP_BY(Person.NAME, SEQ(COUNT(), PIE(Person.SEX)))`).
              end().
              add(sink).
            end().
          end().
        end();
    },
  ],
  css: `
    table^table {
      border-collapse: collapse;
    }
    table^table,
    th^table,
    td^table {
      border: 1px solid black;
    }
  `,
  actions: [
    {
      name: 'addPerson',
      code: function() {
        var names = [
          'Mike',
          'Adam',
          'Kevin',
        ];
        this.dao.put(this.Person.create({
          name: names[Math.floor(Math.random()*names.length)],
          age: Math.floor(Math.random()*100),
          sex: Math.floor(Math.random()*2) ? 'M' : 'F',
        }));
      },
    },
  ],
});

@@ -1722,37 +1722,23 @@
    a
-ddClass(this.myClass('table')
+ttr('border', 1
 ).%0A 
@@ -1775,110 +1775,18 @@
     
-addClass(this.myClass('table')).%0A            start('td').%0A              addClass(this.myClass('table')
+start('td'
 ).%0A 
@@ -1963,55 +1963,8 @@
 ').%0A
-              addClass(this.myClass('table')).%0A
     
@@ -2177,162 +2177,8 @@
  %5D,%0A
-  css: %60%0A    table%5Etable %7B%0A      border-collapse: collapse;%0A    %7D%0A    table%5Etable,%0A    th%5Etable,%0A    td%5Etable %7B%0A      border: 1px solid black;%0A    %7D%0A  %60,%0A
   ac

Simplify styling of demo a little.