IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
PartialFunctionは、すべての値について定義されているとは限らない関数を示しているFunction1の特殊なケース。 val pf:PartialFunction[Int,String] = { case i if i>1000 => "Big" } PartialFunctionそのものの話はとりあえず置いといて、Scalaってこんな書き方が出来る。型パラメータを2つとる型については中置のようにできる。 val pf:Int PartialFunction String = { case i if.... } でもこれなんだかよくわからない。でも Int => String のように書きたいので、 type ~>[A,B] = PartialFunction[A,B] val pf:Int ~> String = { case i if ... } とかエイリアスを定義してお
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く