Example does not compile

'}' at wrong line in the two example.