4 ms·
For anyone that had trouble learning the condition system, or just wants another example, this helped me: http://symbo1ics.com/blog/?p=1405 http://symbo1ics.co
by howeyc 14y ago
For anyone that had trouble learning the condition system, or just wants another example, this helped me:
http://symbo1ics.com/blog/?p=1405 http://symbo1ics.com/blog/?p=1405
- qznc 14y agoThat task here is: A 'compute-slopes' function gets a list of points and returns a list of slops between consecutive points. The problem: What if points have the same x-value, hence the slope is undefined. Solution 1 Exceptions: throw new DivisionByZero() Solution 2 Condition Handling: provide the restarts point to (a) return nil, (b) return 0, and (c) return a user-specified value. Solution 3 Return Error: return Error("division by zero")