[ prog / sol / mona ]

prog


What are you working on?

53 2019-01-12 14:51

>>50
Shouldn't it return a tree so that you can keep track of where each product belongs? Should that just be done by the relative position of the products in a list?
That call pattern just confuses me even more, there were cases where when the data was small to medium size where the memoized function was even slower than the non-memoized version, and when the value was large they were equivilent, I can confirm that the memoize function is functioning as expected. (although due to the curried function I'm not actually memoizing the correct values)
>>51

If you write a vector-fold that uses a vector and a usable length, the leaf-* helpers from "Iterators" become vector folds and they only need the accumulating lambda, without repeating the iteration code.
Similarly, the *-iter helpers from "Iterators" are all instances of a level-1-fold that provides the level-1 vectors and their usable length to the accumulating function.

Oh man, that's super sweet, I was thinking I was going to have to use macros for this for some reason.

Radix-append looks good now. One thing I think has become unnecessary is the (> length-1 0) part of the final-remainder test, since empty radices are handled entirely separately.
Are you sure you want to use 'value' as the next accumulator for leaf-cumulate-iter rather than the return of 'proc'?

Anyway I'll stay good on my promise to myself and work on these tommorrow, thanks for the help as always though anon.

199


VIP:

do not edit these