<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Sometimes, when a variable is bound then used only once in a
function call, it seems easier just to just use what it is bound to
directly in the function call, bypassing the first step.<br>
<br>
Here's an example:<br>
<br>
<div style="color: #ffffff;background-color: #002451;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 16px;line-height: 22px;white-space: pre;"><div><span style="color: #bbdaff;">getSound</span><span style="color: #ffffff;">(</span><span style="color: #ff9da4;">Event</span><span style="color: #ffffff;">) </span><span style="color: #99ffff;">-></span><span style="color: #ffffff;"> </span><span style="color: #bbdaff;">element(</span><span style="color: #ffeead;">evaluate</span><span style="color: #bbdaff;">:probableElement(</span><span style="color: #ffeead;">evaluate</span><span style="color: #bbdaff;">:probabilities(</span><span style="color: #ffeead;">maps</span><span style="color: #bbdaff;">:get(</span><span style="color: #d1f1a9;">elementTag</span><span style="color: #bbdaff;">, </span><span style="color: #ff9da4;">Event</span><span style="color: #bbdaff;">))),</span></div><div><span style="color: #bbdaff;"> hd(</span><span style="color: #ffeead;">lists</span><span style="color: #bbdaff;">:nth(</span><span style="color: #ffeead;">maps</span><span style="color: #bbdaff;">:get(</span><span style="color: #d1f1a9;">templateTag</span><span style="color: #bbdaff;">, </span><span style="color: #ff9da4;">Event</span><span style="color: #bbdaff;">), agitatedSoundResources(</span><span style="color: #ffeead;">maps</span><span style="color: #bbdaff;">:get(</span><span style="color: #d1f1a9;">scalarTag</span><span style="color: #bbdaff;">, </span><span style="color: #ff9da4;">Event</span><span style="color: #bbdaff;">), </span><span style="color: #ffeead;">maps</span><span style="color: #bbdaff;">:get(</span><span style="color: #d1f1a9;">registerTag</span><span style="color: #bbdaff;">,</span></div><div><span style="color: #bbdaff;"> </span><span style="color: #ff9da4;">Event</span><span style="color: #bbdaff;">), </span><span style="color: #ffeead;">maps</span><span style="color: #bbdaff;">:get(</span><span style="color: #d1f1a9;">transpositionTag</span><span style="color: #bbdaff;">, </span><span style="color: #ff9da4;">Event</span><span style="color: #bbdaff;">)))))</span><span style="color: #ffffff;">.</span></div></div>
<br>
Alternatively, I could have declared, for example, a raft of
variable like ElementNumber, ElementTag, TemplateTag, etc.<br>
<br>
I realize that this all-in-one-compact version tends towardsÂ
inscrutabel c code liek &X++ ?.<br>
<br>
How do you approach the temptation to avoid discrete steps in favor
of compactness?<br>
<br>
Thanks.<br>
<br>
Don<br>
<br>
</body>
</html>