Avatar
repeat each is not a single production in the grammar; they don't always appear as consecutive tokens. repeat (each T, Int) means something other than (repeat each T, Int). If we substitute T for String, Bool, the first one becomes (String, Int), (Bool, Int) while the second is (String, Bool, Int).
11:56 PM
T = {String, Bool} のとき repeat (each T, Int) => (String, Int), (Bool, Int) (repeat each T, Int) => (String, Bool, Int)
👀 1
11:56 PM
このようにrepeatがどこにかかってるかで意味が変わる (edited)
11:57 PM
ユーザーとしてはこの部分の理解がミソっぽい (edited)
11:59 PM
書き込みでは each Teach 要らなくない?って意見が結構多い 実際意味解析としては T がパック型なのはわかってるから無くても良い文法にはできるけど チームとしてはマーキングされていることで読みやすい事が重要って意見っぽい (edited)
t_naruhodo 1