Parametric polymorphism: Difference between revisions

Content added Content deleted
Line 763: Line 763:
Apply `f` (element-wise and in-place) to the values in tree `bt`.
Apply `f` (element-wise and in-place) to the values in tree `bt`.
Also prints the tree like an s-expression *for demonstrative purposes only*,
Also prints the tree like an s-expression *for demonstrative purposes only*,
new types should override the `show()` function for pretty-printing.
new types should overload the `show()` function for pretty-printing.
"""
"""
function map!(f::Function, bt::Tree{T}) where T
function map!(f::Function, bt::Tree{T}) where T