let numbers = [1, 5, 6, 12, 52, 25];
let state: list((int, bool)) = numbers |> List.map(n => (n, false));
state |> List.map((n, b) => <NumberCard number=n picked=b onClick />);
タイプチェッカーが次のように言っているため、何が間違っている可能性があります:
51 ┆
52 ┆ let elems =
53 ┆ state |> List.map((n, b) => <NumberCard number=n picked=b onClick />
);
54 ┆
55 ┆ <div className="flex flex-column">
This has type:
list(int) => list(bool => React.element)
But somewhere wanted:
list((int, bool)) => 'a
The incompatible parts:
int
vs
(int, bool)