Open wei-yuan opened 7 years ago
I think the idea was to take a real world example (JTL) (i.e. existing code). Otherwise the two cases are identical and both can be spartanized. Is there something I missed? Anyway thanks for your interest.
BTW the spartanization here can be incorrect in some contexts; the original code can return null
while the spartanized version cannot. I think the current version of the spartanizer only merges the statements without pushing down the ternary operator:
return tail.isEmpty() ? s : s + ":" + tail.toString();
@OriRoth Thx for reply, I just want to make sure I didn't misunderstand anything
Hi guys Thanks for your tutorial But I believe there might have something missing here in Ternarization.md
Here is another example, taken from the JTL code development. The following code excerpt uses the string s twice.
to
Correction file here