Price fraction: Difference between revisions
→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 3,236:
Langur uses decimal floating point.
<syntaxhighlight lang="langur">
val pricefrac = fn f:switch[and] f {
case >= 0.00, < 0.06: 0.10
case >= 0.06, < 0.11: 0.18
Line 3,258 ⟶ 3,259:
case >= 0.96, <= 1.00: 1.00
default: throw "bad data"
writeln
writeln
</syntaxhighlight>
{{out}}
|