From the docs:
expect
Dict.single 1 "One"
|> Dict.insert 2 "Two"
|> Dict.insert 3 "Three"
|> Dict.insert 4 "Four"
|> Bool.isEq (Dict.fromList [T 1 "One", T 2 "Two", T 3 "Three", T 4 "Four"])
What is T doing in the list? Is it a specific type?
Is an anonymous tag with one type. T, short for Tuple
We should update it to real tuples since they exist now
Could be seen as being defined as Tuple k v: [ T k v ]
Just curious, but is there any difference between using a tuple and a tag other than syntax? Is there anything that tuples can do that a tag can’t?
Well, you can access its members without destructuring with the tuple.0 syntax
Yeah, i think that is the only noticeable difference, so, fundamentally, i would consider them two ways to write the same thing.
Last updated: Nov 09 2025 at 12:14 UTC