Working with lists and io:format