user@localhost ~ $ python interact.py please input. >>> test Traceback (most recent call last): File "", line 1, in NameError: name 'test' is not defined >>> hoge Traceback (most recent call last): File "", line 1, in NameError: name 'hoge' is not defined >>>
なんかエラーになる。。。
ライブラリには、以下のように記述されているけど、 readfunc とか local って何だろう。。。
【初稿】 a 0=1189 a 1=841 a n=a(n-2)`div`2 l=length f n x k=n++([1..k-l n-l x]>>" ")++x main=mapM putStr\\ ["A"++f(show n)(show$a(n+1))7++"mm x"++f""(show$a n)5++"mm\n"|n<-[0..10]]
【修正後1】
a 0=1189 a 1=841 a n=a(n-2)`div`2 l=length f n x k=n++([1..k-l n-l x]>>" ")++x s=show main=mapM putStr\\ ['A':f(s n)(s$a(n+1))7++"mm x"++f""(s$a n)5++"mm\n"|n<-[0..10]]
【修正後2】 # 使ったが縮まってない。。。
a 0=1189 a 1=841 a n=a(n-2)`div`2 l=length n#(x,k)=n++([1..k-l n-l x]>>" ")++x s=show main=mapM putStr\\ ['A':s n#(s$a(n+1),7)++"mm x"++""#(s$a n,5)++"mm\n"|n<-[0..10]]