2008-12-10から1日間の記事一覧
http://www.cut-the-knot.org/do_you_know/AllPerm.shtml の B. Heap's algorithm で、順列を生成してみる。 (use gauche.uvector) (define-syntax =2 (syntax-rules () ((=2) #f) ((=2 t) t) ((=2 t1 t2) (let ((x t1)(y t2)) (if (eq? x y) x #f))) ((=2 t…
http://www.cut-the-knot.org/do_you_know/AllPerm.shtml の B. Heap's algorithm で、順列を生成してみる。 (use gauche.uvector) (define-syntax =2 (syntax-rules () ((=2) #f) ((=2 t) t) ((=2 t1 t2) (let ((x t1)(y t2)) (if (eq? x y) x #f))) ((=2 t…