26 Nov
2016
26 Nov
'16
4:50 a.m.
On Fri, 25 Nov 2016 18:18:21 +0100 Daniel Trstenjak <daniel.trstenjak@gmail.com> wrote:
Hi Brian,
interestingly in my journeys through the intertubes I have not found a single mention of using the "()" syntax in place of the "{fieldname=value, ...}" syntax as the generator.
The '()' isn't part of the 'data constructor' (the usual term for A1/A2/A3), but sometimes needed to help the compiler to make an unambiguous parsing of the expression.
These are all valid expressions:
i $ A1 "foo" 3.2 -- '$' is often used to get rid of parentheses
let a1 = A1 "foo" 3.2 in i a1
oh, i see. everything's a function. thanks! Brian