You might also like Roc. I don't completely understand how but it does type inference over the whole program - so you can use a loose type that "tightens" when you use it in a different way. Maybe that's a bad explanation. I think the following video is the one that demonstrates this
https://m.youtube.com/watch?v=7R204VUlzGc