Learn promises by example