as suggested by @pqwy, use index_from and not be quadratic in space
move name outside of inner function
style
Merge pull request #5 from hannesm/not-quadratic

as suggested by @pqwy, use index_from and not be quadratic in space