AT
Size: a a a
AT
AT
AT
S
Adding hierarchical type classification can result in programming communities that spend most their time talking about the "right" way to organise the universe of type classes, and experience surprisingly dogmatic discussions about that
WB
Oℕ
I don't want F# to be the kind of language where the most empowered person in the room is the category theorist.
S
EK
λ
WB
ΛВ
Oℕ
AT
λ
D
so that we can work around the fact that overloaded methods taking functions as parameters can't accept partial functions as well
def map[R: TypeInformation](fun: T => R): DataStream[R]
def map[R: TypeInformation](mapper: MapFunction[T, R]): DataStream[R]
MapFunction
определен как джововский@FunctionalInterface
public interface MapFunction<T, O> extends Function, Serializable {
O map(T value) throws Exception;
}
PartialFunction[-A, +B] extends (A) => B
?S
AD
D
,
val dataStream: DataStream[(String, String)] = ...
dataStream.map { case (key, value) => key }
D
val o: Option[String] = ...
Option(f(o.getOrElse(default)))
o.map(f).getOrElse(f(default))
ΛВ