Text this: Typed non-determinism in functional and concurrent calculi