I had checked out F# for a while, some time earlier. IIRC, it has some features like that, for encoding business logic in code/types. Probably some other languages do too.
I had mainly used Scott Wlaschin's site F# for Fun and Profit, and MS sites, for F#.
Edit: Also had looked at OCaml, via Real World OCaml, and also much earlier, via INRIA / O'Reilly sites / books / software.
I had mainly used Scott Wlaschin's site F# for Fun and Profit, and MS sites, for F#.
Edit: Also had looked at OCaml, via Real World OCaml, and also much earlier, via INRIA / O'Reilly sites / books / software.
F# may be based on OCaml.
Both resources are free to read online.