September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
19
Task/Multifactorial/Scheme/multifactorial.ss
Normal file
19
Task/Multifactorial/Scheme/multifactorial.ss
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
(import (scheme base)
|
||||
(scheme write)
|
||||
(srfi 1))
|
||||
|
||||
(define (multi-factorial n m)
|
||||
(fold * 1 (iota (ceiling (/ n m)) n (- m))))
|
||||
|
||||
(for-each
|
||||
(lambda (degree)
|
||||
(display (string-append "degree "
|
||||
(number->string degree)
|
||||
": "))
|
||||
(for-each
|
||||
(lambda (num)
|
||||
(display (string-append (number->string (multi-factorial num degree))
|
||||
" ")))
|
||||
(iota 10 1))
|
||||
(newline))
|
||||
(iota 5 1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue