My first package: elm-triplet

I created elm-triplet, but since it is the first elm package that I am publishing and I don’t want to fill up the repository with unnecessary stuff, I would like to know if it is properly assembled and if I am not repeating someone else’s work. Here is the doc preview:


1 Like

Nice, this is neat! The only other 0.19 package I know with similar functionality is

Well, duplicate effort then xD. Thanks for pointink it out!

I seem to end up writing similar functions again and again so definitely useful to wrap them up in a package. I like the nice compact conversion to three element records, so thanks for that.

I do wonder, now the Elm can only use 2- and 3- tuples, whether there’s now a stronger argument for such functions to be standard in the core Tuples module.

In elm-tuple-extra you have uncurry that does the same, and since it is much more complete and the elm compiler gets rid of all dead code, I think it is better to use the bigger package, but thanks for the nice comment anyway :slight_smile:

I might be misunderstanding you, but as far as I remember tuple3 was just removed in 0.19, as you should be using records instead.

You can have tuples up to the size of 3 elements, otherwise the compiler encourages you to use records. The Tuple3 that I am referring is part of the package elm-tuple-extra from TSFoster.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.