fork download
  1. main = interact f
  2.  
  3. p(x:r)|(a,b)<-p r=case x of '('->("(\\x->"++a++(fst(p b)),"");'.'->('(':a++")",b);')'->(" x)",r);_->(x:a,b)
  4. p _=("","")
  5. f s=fst(p('(':s++")"))
Success #stdin #stdout 0s 5272KB
stdin
i(($3).i(`i`1)(*3))4 64
stdout
(\x->i(\x->(\x->$3 x)(i(\x->`i`1 x)(\x->*3 x) x))