Add tags

Add tags to the following comment
高階関数を使った版。

コード長くなった、読みづらくなった。orz
1
2
3
4
5
import List

partitionNum n m = iterate f ([[]]: repeat []) !! m !! n  where
  f xs = tail $ snd $ mapAccumL g (repeat []) [0..] where
    g (y:ys) i = (zipWith (++) (map (map (i:)) xs) ys, y)

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...