[ prog / sol / mona ]

prog


What are you working on?

12 2018-12-25 12:41

http://ix.io/1wGr

Some preliminary observations:
- It is unclear to me why 5, 32 and #b11111 are hardcoded throughout.
- There is a mixed use of the term 'depth' both with and without multiplication by 5.
- The abstraction of extract-5 is violated in the operation call in radix-copy-path.
- Using the number of the bit group instead of the shift as parameter to extract-5 would have made your bit packing scheme quicker to grok for me, along with a comment stating that groups are numbered from 1 rather than 0 and that the number is the distance from a leaf rather than the root, effectively making it a reverse depth.
- In radix-copy-path the same new-radix is returned on both branches, so it can go after the 'if'. Then the branches can lose the 'begin's. Since the let body is a lambda and has an implicit 'begin', they can be removed entirely.
- copy-path-iter! is linear recursive rather than linear iterative, so the name is misleading. The same goes for some of the other helpers named *-iter.

199


VIP:

do not edit these