A functional story generator for Swift