This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Fact { | |
implicit class RichInt(val n : Int) { | |
def ! : Int = (1 to n).product | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jp.mydns.akanekodou.scala | |
import math.Rational | |
object Main extends App { | |
// ここから | |
implicit val RationalIsFractional = new Fractional[Rational] { | |
// compare の実装 | |
def compare(x : Rational, y : Rational) : Int = | |
(x.numerator * y.denominator) compare (x.denominator * y.numerator) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"model": "major_city.district", | |
"pk": 1, | |
"fields": { | |
"name": "北海道" | |
} | |
}, | |
{ | |
"model": "major_city.district", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@counter-style em-decimal { | |
system : numeric; | |
symbols : "\FF10" "\FF11" "\FF12" "\FF13" "\FF14" "\FF15" "\FF16" "\FF17" "\FF18" "\FF19"; | |
} |
OlderNewer