The two functions I wrote should be outputting the same results, but
they aren't.