I started Swift with the Swift guided tour. I was impressed you could read and try code snippet at the same time with Xcode. Excellent idea! Googling around, I bumped into this nice project swift-playground-builder which takes markdown document and generate a playground. How does it do it? simple Playground is a folder with xml files... But it looks like magic, you can create your doc à la "guided tour".
Update: If you want to dig more into playground and documentation format read Andrew Bancroft and another one by Matt Mathias