Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created December 2, 2011 14:20
Show Gist options
  • Save yuroyoro/1423386 to your computer and use it in GitHub Desktop.
Save yuroyoro/1423386 to your computer and use it in GitHub Desktop.
Scalaでも(Fate/Zero) や (Fate/stay night) でメソッド呼べる > @mnzktw 「(Fate/Zero) や (Fate/stay night) でJava のメソッドが呼べそうな気がしたらきっとあなたは clojurian」
scala> trait Term { def night = () }
defined trait Term
scala> object Zero extends Term
defined module Zero
scala> object stay extends Term
defined module stay
scala> object Fate {
| def /(t:Term) = t
| }
defined module Fate
scala> Fate/Zero
res6: Term = Zero$@600c199f
scala> Fate/stay night
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment