/usr/lib/s9fes/sum.scm is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ; Scheme 9 from Empty Space, Function Library
; By Nils M Holm, 2009
; See the LICENSE file of the S9fES package for terms of use
;
; (sum integer1 integer2) ==> integer
;
; Compute the sum of a range of integers.
;
; Example: (sum 2 5) ==> 14
(define (sum n m)
(let ((x (+ 1 (- m n))))
(+ (quotient (+ x (* x x))
2)
(* x (- n 1)))))
|