Entries in scope (1)

Does q have closures?

Not quite. q supports what it calls projections, which are functions whose arguments are partially specified. Projections can serve the same purpose as closures, albeit (and ironically, we might add) with some additional typing:

f: {[list; n]
{[nn; item]
/ n cannot be referenced here,
/ so we pass it as nn
nn + item}[n; ] each list
}

See: Closure