5 ms·
It is very beautiful because it seems to match quite closesly the diagrammatic interpretation of a symmetric monoidal closed category. For example because of th
by theaeolist 14y ago
It is very beautiful because it seems to match quite closesly the diagrammatic interpretation of a symmetric monoidal closed category. For example because of the functoriality of the the monoidal tensor we have
(g ∘ h) ⊗ (i ∘ j) = (g ∘ i) ⊗ (h ∘ j)
so the two expressions should be indistinguishable. Indeed, in this Z syntax the expression
k g h
i j
could be parsed either as k ( g(h) ⊗ i(j) ) or as k( (g⊗i)(h⊗j) ) but this ambiguity does not matter since they are equivalent. I wonder if
k g
h
is a partial appilcation that would give you a function of the right type, i.e. the type of h ⊗ j.
Anyway, beautiful stuff.
PS. Not sure how to typeset this properly in this web site.
PS. Thanks to commenter.
- quarterto 14y agoFunnily enough, code blocks are created by indenting with spaces. But since it is too late for you to edit your comment, here are your examples: k g h i k k g h
- chrisdone 14y agok g h i j Presumably?
- kenko 14y agoSurely the ambiguity is likely to matter in actual programs?
- chrisdone 14y agoThere is no ambiguity in the z-expression syntax as far as I have been able to detect. Following the straight-forward rule of right-associative application: k g h i j → k (g h i j) → k (g h (i j)) In Lisp syntax: (k (g h (i j))