complete test of algorithm typechecks but doesn't compile