Parametric polymorphism: Difference between revisions

m
(added Ursala)
Line 251:
</lang>
(The %Z type operator constructs a "maybe type", i.e., the free union of its operand type
with the null value.) AAt mappingthe combinatorother overextreme, thisone typemay canconstruct bean definedequivalent asparameterized type shown.in
point-free form.
<lang Ursala>
binary_tree_of = %-hhhhWZAZ
</lang>
A mapping combinator over this type can be defined as shown.
<lang Ursala>
binary_tree_map "f" = ~&a^& ^A/"f"@an ~&amPfamPWB
Anonymous user