def superCalculate(): Int = 42 def hyperCalculate(i: Int): Int = i * i def formatCutely(i: Int): String = "♡♡♡♡♡ " + i + " ♡♡♡♡♡" Some(formatCutely(hyperCalculate(superCalculate()))) ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ ここが非常にわかりづらい。どういう意味でわかりづらいかというと処理順番と表記順番が逆である点だ。 処理順番は superCalculate hyperCalculate formatCutely Some であるにも関わらず、コードを読むときは Some formatCutely hyperCalculate superCal
Representing case classes as JSON arrays The first thing to note is that the circe-shapes module provides instances for Shapeless's HLists that use an array representation like the one we want for our case classes. For example: scala> import io.circe.shapes._ import io.circe.shapes._ scala> import shapeless._ import shapeless._ scala> ("foo" :: 1 :: List(true, false) :: HNil).asJson.noSpaces res4:
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く