Reviewing vactur, it seems like some of these operations reimplement Lil primitives or brief idioms. For example,
vac.constant: on _ n c do on _ do c end @ (range n) end end
Replicates n copies of a constant c. This could be implemented in terms of the primitive "take"; possibly with an enclosed version of c if it may be something other than an atom:
3 take 5 # (5,5,5) 3 take list 11,22 # ((11,22),(11,22),(11,22))
Likewise,
vac.isin: on _ v s do t: vac.constant[(count v) 0] each x in s t: t | (v = x) end t end
The core of this loop could be expressed as
max each x in s v = x end
But the whole operation appears to be equivalent to the primitive "in":
(2,3,5) in (4,11,17,5,3) # (0,1,1)
The "partitioning[]" function is implemented in terms of "where" (a primitive in some APL-family languages, but not Lil);
vac.where: on _ m do extract index where value from m end vac.partitioning: on _ m do vac.where[m],vac.where[!m] end
But we can do the equivalent in a single query by using a "by" clause to group rows:
extract index by value from m
Not only does this reduce overhead, it makes the formulation more general:
vac.partitioning[1,0,1,1,0,1] # (0,2,3,5,1,4) extract index by value from 1,0,1,1,0,1 # (0,2,3,5,1,4) extract index by value from "ABAABA" # (0,2,3,5,1,4)
Please don't take this as discouraging your efforts; just pointing out some alternatives.