0358デフォルトの名無しさん
2020/02/02(日) 15:24:04.03ID:9xJm9DGW確かに、滅んで欲しい
SML(静的型付け):
- (1, 2, 3);
val it = (1,2,3) : int * int * int (* タプル型(要素は整数型) *)
- (1, true, "Foo");
val it = (1,true,"Foo") : int * bool * string (* タプル型(要素の型は混在) *)
- [1, 2, 3];
val it = [1,2,3] : int list (* リスト型(要素は整数型) *)
- [1, true];
stdIn:12.1-12.9 Error: operator and operand don't agree [overload conflict]
operator domain: [int ty] * [int ty] list
operand: [int ty] * bool list
in expression:
1 :: true :: nil (* 要素の型が混在するリストは誤り *)
(長いので続く)