0

I'm trying to use Chicken Scheme's abort procedure as shown in the code below:

(module change-calculator (export calculate-change)
  (import scheme)

  (define (calculate-change coin-values amount)
    (cond ((null? coin-values) (abort '"coin-values should contain at least one value."))
          ((= 0 amount) '() )))
)

but get the following warning:

Warning: reference to possibly unbound identifier `abort' in:
Warning:    calculate-change

The documentation does not mention any additional module that needs to be imported. I've tried importing extras,utils,srfi-12 without any success. Can anyone show me the correct way to use the abort procedure? Or am I missing something else?

Bas Bossink
  • 9,388
  • 4
  • 41
  • 53
  • 1
    You don't need to put a quotation mark in front of the string here. Strings evaluate to themselves, so quoting them does not make a difference. – sjamaan Sep 07 '15 at 08:07

1 Answers1

5

Ah, an easy mistake to make. The line (import scheme) should be (import scheme chicken). Good luck with your module!

Alex V
  • 3,416
  • 2
  • 33
  • 52