Slide 63
Slide 63 text
63
©2024 Loglass Inc.
直積集合について
- A × B = { (a,b) ∣ a ∈ A, b ∈ B } (=AかつB)
- 要するに構造体(Class)
(1, “あ”) (1, “い”) (1, “う”)
(2, “あ”) (2, “い”) (2, “う”)
(3, “あ”) (3, “い”) (3, “う”)
A:
1,
2,
3,
B: “あ”, “い”, ‘う“
A ✖ B
class CancelledOrder(
val orderId: OrderId,
// 中略
val cancelledAt: LocalDateTime,
val cancelReason: String?,
)
CancelledOrder = OrderId ×
LocalDateTime × String