
25 Nov
2016
25 Nov
'16
3:50 p.m.
On Fri, 25 Nov 2016 18:18:21 +0100
Daniel Trstenjak
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