fork download
  1. #!/bin/sh
  2. #|
  3. exec csi -s "$0" "$@"
  4. |#
  5.  
  6. (require-extension (only srfi-1 remove iota))
  7. (import (chicken process-context)
  8. (chicken format))
  9.  
  10. (define (Func num max)
  11. (let ((base (+ 1 (* (quotient num 10) 10))))
  12. (length
  13. (remove (lambda (x)
  14. (> (* x (modulo x 10)) max))
  15. (iota 9 base)))))
  16.  
  17. (define (main args)
  18. (handle-exceptions exn
  19. (begin
  20. (display "bad argument count")
  21. (newline))
  22. (format #t "N = ~a~%" (apply Func (map string->number args))))
  23. 0)
  24.  
  25. (cond-expand
  26. (chicken-script
  27. (main (command-line-arguments)))
  28. (else))
  29.  
Runtime error #stdin #stdout #stderr 0.01s 7832KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: (import) during expansion of (import ...) - cannot import from undefined module: process-context

	Call history:

	<syntax>	  (require-extension (only srfi-1 remove iota))
	<syntax>	  (##core#require-extension ((only srfi-1 remove iota)) #t)
	<syntax>	  (##core#begin (##core#begin (##sys#load-library (quote srfi-1) #f) (import (only srfi-1 remove iota)...
	<syntax>	  (##core#begin (##sys#load-library (quote srfi-1) #f) (import (only srfi-1 remove iota)))
	<syntax>	  (##sys#load-library (quote srfi-1) #f)
	<syntax>	  (quote srfi-1)
	<syntax>	  (##core#quote srfi-1)
	<syntax>	  (import (only srfi-1 remove iota))
	<syntax>	  (##core#undefined)
	<syntax>	  (##core#undefined)
	<eval>	  (##sys#load-library (quote srfi-1) #f)
	<syntax>	  (import (chicken process-context) (chicken format))	<--