Question

we've been given the task to make a Dictionary, as a List of tuples with (String, String). The problem here is that I actually have no idea if I can rename String twice at the same time, since I want the tuple to look like this

(German, English)

Is it even possible to just make it look like this?

type German =  String
type English = String
type Dictionary = [(German, English)]

Or would there be any conflicts? It was kinda frustrating not finding a single entry about this, been almost 2 hours and not a single line of code stands right now :|

Was it helpful?

Solution

Yes, you can do that. You can't do the opposite

type German = String
type German = Int        -- conflicts here!

OTHER TIPS

Of course you can, if you couldn't, you wouldn't be able to compile type German = String in the first place, as it's already been named ;-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top