-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
insert
should append a value?
#4
Comments
Another good example is [ ( 1, 1 ), ( 2, 2 ), ( 3, 3 ), ( 4, 4 ) ]
|> Dict.fromList
|> Dict.toList ends up with |
I agree with you that the behavior is a bit surprising. This was one of the aspects of the library that I was the most unsure about before publishing. The reason With regards to changing I want to make the change to |
Hi, just checking if there's a plan to change this soon? (currently I'm running a local patched lib, but would be happy to use upstream) |
I am going to try to release a new version once I am done with school in about two weeks and I expect this change to be included. Hang in there! |
Hi 👋 Anything I can help to get it forward? I just added the forked file to the 4th Gizra project, and I feel bad about it every time! 😉 |
Hi @pzp1997 are you still interested in this fix? We're now at the ~7th project with our own fork. |
Currently we prepend the new value and it appears on the top of the list.
assoc-list/src/AssocList.elm
Line 191 in 63ffd69
This means that if we have a list
[ ( 1, 1 ), ( 2, 2 ), ( 3, 3 ), ( 4, 4 ) ] |> Dict.fromList
results with
D [(4,4),(3,3),(2,2),(1,1)]
I'd expect the list order to remain as is, or is there a good reason not to?
The text was updated successfully, but these errors were encountered: