Extending `Array.of` behaviour to `Set`, `Range` etc

If you’re asking whether dry-types can express this today, not to my knowledge.

Array.of works because Arrays are first-class type objects in the system; Set and Range are not, so while you could define nominal types for them, in order to do member type-checking you would need to implement member classes like Array has.

But types are not that useful on their own, so in order for schemas and contracts to understand these types, you would also need to introduce AST support for them.

In other words: it would be possible to do this, but it’s high-effort.