Add tags

Add tags to the following comment

Schemeならsrfi-42でcomprehensionが使えます。

1
2
3
4
5
6
7
(use srfi-42)

(define (partition-num n m)
  (if (= m 1)
    `((,n))
    (list-ec (: x 0 (+ n 1)) (: xs (partition-num x (- m 1)))
             (cons (- n x) xs))))

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...