Anonymous user
Parametric polymorphism: Difference between revisions
m
→{{header|Ursala}}
(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.)
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
|