Text this: Using higher-order contracts to model session types