Elephant random walk: sampling from memory