3 ms·
My intuition from other languages is that it's a type and a set of constructors. leaf constructs an instance of type BinTree, as does node(4, leaf, leaf). This
by Jtsummers 10y ago
My intuition from other languages is that it's a type and a set of constructors. leaf constructs an instance of type BinTree, as does node(4, leaf, leaf). This also matches how it's used in the where clause.
The documentation seems to verify my intuition: http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28part._.Data%29 http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28par...