def slot_of
import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalkimport Base
92# List.get / head / last / length, String.get / length, Array.get; not List.set
93def slot_of(+tt: String) -> Slot:
94 slot_pick(
95 List.contains(~String, ~String.eq, ["List.get", "List.head", "List.last", "List.length"], tt),
96 Bool.or(String.eq(tt, "String.get"), String.eq(tt, "String.length")),
97 String.eq(tt, "Array.get"))