Comment detail

LL Golf Hole 6 - 10進数を2進数に基数変換する (Nested Flatten)
2進数の無限リストを使って。
1
2
3
4
5
6
7
a="1":(a>>=(\x->[x++"0",x++"1"]))
b=(!!)$"0":a

{-
> b 10
"1010"
-}

3文字

1
a="1":[x++y|x<-a,y<-["0","1"]]
あー、そうでした、、、不覚。orz

Index

Feed

Other

Link

Pathtraq

loading...