Implement expand

Implementation of expand, closes #127.
This lonely `.as_slice()` seems looks a little strange to me.  I think it would be nicer if it was on the previous line.