message: Move variables in scrollSnap to its local context
diff: @@ -14,12 +14,13 @@ export type ScrollSnap = {
  export function ScrollSnap(params: Params): ScrollSnap {
  const { snapSizes, alignSize, loop } = params
  - const limit = Limit({ min: 0, max: snapSizes.length - 1 })
  - const counter = Counter({ limit, start: 0, loop })
  const alignSizes = snapSizes.map(alignSize.measure)
  const distancesBetween = distancesBetweenScrollSnaps()
  function distancesBetweenScrollSnaps(): number[] {
  + const limit = Limit({ min: 0, max: snapSizes.length - 1 })
  + const counter = Counter({ limit, start: 0, loop })
  +
  return snapSizes.map((size, index) => {
  const next = counter.clone().set(index + 1)
  return size + alignSizes[index] - alignSizes[next.get()]
  