4 ms·
Close enough? case X of {Cat, N} when Cat == expense; Cat == invoice; Cat == loss -> Total - N; {credit, N} -> Total + N end
by marci 8y ago
Close enough?
case X of
{Cat, N} when Cat == expense; Cat == invoice; Cat == loss -> Total - N;
{credit, N} -> Total + N
end
- klibertp 8y agopatrec said that > you can sometimes ameliorate it with guards which is exactly what you did, so I don't think you're disagreeing here :)