Random walks in varying dimensions