links-lang / links

Links: Linking Theory to Practice for the Web
http://www.links-lang.org
Other
333 stars 43 forks source link

Add h0 and a0 to MvuHTML and MvuAttrs libraries #1155

Closed SimonJF closed 2 years ago

SimonJF commented 2 years ago

The monoidal units of MvuHTML.HTML and MvuAttrs.Attr are accessed by MvuHTML.empty and MvuAttrs.empty. When creating a tree, these are quite verbose to use, so the pattern I've ended up doing is:

var a0 = MvuAttrs.empty;
var h0 = MvuHTML.empty;
div(a0, h0)

I do this so much that I think it would actually be better to have these shortcuts in the actual libraries. It's handy for me and I don't see any harm in it.

SimonJF commented 2 years ago

Thanks!