Fix code example in docs

Should clear up syntax based on feedback from #6.