Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I was lazy and did not do tests again. I also didn't refactor when I was given terminology, which I almost certainly will need to do when later problems push for using this code again and expanding it. Some key things worth noting: * R starts indexes with 1, so there are a bunch of places in the instruction code where I have to do + 1s etc * pmap is really cool-- it's what until a couple of months ago I thought rowwise was all about, and thankfully someone on twitter said the right thing to make me realize this is how it works. * there's almost definitely a better way than producing all the results and looking for the right one, but who knows. This was fast. * scoping in R is cool, and understanding when you are and are not overwriting state in `pmap` and `for` loops is key to finding the quick ways to do this. In a new language, the "careful to reset" advice would be more important because of pass-by-reference semantics and mutable data structures.
- Loading branch information