I am trying to understand the "ans_array" subroutine as part of efforts to get PreTeXt to work with problems that use "ans_array". After some exploring, it seems to me there are two versions of this macro. One is in the Value package (with variants for Point, Vector, Matrix, and Formula Math Objects). If $M is a math object and you use $M->ans_array(), you get an array of answer blanks. I understand this and I believe I understand the code that builds these answer arrays.
Then in PGbasicmacros.pl (as well as in PGmorematrixmacros.pl) there is also an "ans_array" subroutine. Both of these essentially rely on the "display_matrix" subroutine in PGmatrixmacros.pl. You would use this one like: \{ans_array(2,1,5)\}. It doesn't appear designed to be used like $M->ans_array() for any kind of $M.
I'm finding it difficult to understand the code for "display_matrix". But it made me wonder, is this second "ans_array" really even used anywhere? I grepped the OPL for '[^>]ans_array' and I only had six hits. Four of them are just mentioning "ans_array" in a comment, and the code uses the Value version of "ans_array". One of them turned out to be defining its own subroutine called "build_ans_array". Only one problem file in the entire OPL appears to be using the PGmorematrixmacros.pl ans_array. (WHFreeman/Holt_linear_algebra/Chaps_1-4/4.2.5.pg). It seems nothing in the OPL at all is using the PGbasicmacros ans_array.
I also tracked each use of "ans_array" in pg/macros and the OPL macros and found nothing except comments and use of the Value "ans_array".
My question is: Is the PGbasicmacros.pl "ans_array" subroutine used for anything at all? Can I safely ignore it as I try to improve the PreTeXt-WeBWorK connections? (Pushing further, can we clean up PGbasicmacros.pl by deleting things that can be demonstrated to not be in use?)