Dear OMers,
I’m asking for your help again with a sub-patch issue. In the attached folder, there’s a recursive patch and two patches in which I use it. In 01_good_try, the patch works (it’s about obtaining a prime factorization; I know the factorize function is present, but in this case, I needed a different view of the list of lists resulting from factorize), while in 02_bad_try, the patch, with only some input values (for example, multiples of 2 don’t cause problems), results in an error.
The only change I made to the recursive patch in patch #02 was to group some elements together, which evidently creates an error due to multiple evaluations (I imagine?). I’d like, if possible, an explanation on how to avoid such errors (because this isn’t the first time I’ve asked for help with similar problems, and I clearly have a soft spot for this topic).
Thank you for your time and best regards,
your Neo
00_prime_fact.omp (13.9 KB)
02_bad_try.omp (16.3 KB)
01_good_try.omp (2.0 KB)