def arg
import bolt@1.27.0.0/src/rules/calls.bend as Callsimport Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
109# the nth argument, or nothing
110def arg(as: List<&2, Tree.Node>, nn: Nat) -> Tree.Node:
111 match as nn:
112 case Con{h, t} 0n:
113 h
114 case Con{h, t} 1n+p:
115 arg(t, p)
116 case Nil{} m:
117 Tree.NNil{}