Welcome to the CHICKEN Scheme pasting service

project euler 1 pasted by widow on Fri Sep 27 20:26:47 2019

(import (chicken process-context))

(define (multiple i)
	(if (< i 0)
		0
		(+ (mm? i) (multiple (- i 1)))))	

(define (mm? n)
	(if (or	(zero? (modulo n 3))
			(zero? (modulo n 5)))
		n
		0))
		
(print (multiple (string->number(car(command-line-arguments)))))

reindented added by sjamaan on Fri Sep 27 20:30:23 2019

(import (chicken process-context))

(define (multiple i)
  (if (< i 0)
      0
      (+ (mm? i) (multiple (- i 1)))))	

(define (mm? n)
  (if (or (zero? (modulo n 3))
	  (zero? (modulo n 5)))
      n
      0))
		
(print (multiple (string->number (car (command-line-arguments)))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which egg provides `string-pad-right'?
Visually impaired? Let me spell it for you (wav file) download WAV