def range_count

bolt@1.27.0.0 · src/rules/table.bend:60

import bolt@1.27.0.0/src/rules/table.bend as Table
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

60# `List.replicate` / `Array.new` count at argument 2; `List.range` at the end
61def range_count(as: List<&2, Tree.Node>) -> Bool:
62  match as:
63    case Nil{}:
64      False{}
65    case Con{h, Nil{}}:
66      lone_num(h)
67    case Con{h, rest}:
68      range_count(rest)

Uses (4)

Used by (1)