Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yuroyoro/743212 to your computer and use it in GitHub Desktop.
Save yuroyoro/743212 to your computer and use it in GitHub Desktop.
scala> Option({ def Y[Int,String](f:((Int => String),Int) => String,x:Int):String = f((y:Int) =>Y(f,y),x);Y( _:((Int => String),Int) => String,_:Int)}).map{y => y((f:Int => String,n:Int) => n match{case 0 => "ば";case 20 => "あ" + f(n-1);case m =>"ば" + f(n-1);},20)}.get
res42: String = あばばばばばばばばばばばばばばばばばばばば
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment