Re:Elm in Production: 25K Lines Later
by Tarean on Monday July 31, 2017 @03:49PM
(#14895315)
That's reasonably similar to handwritten haskell json parsing:
I wrote <$> and <> out but there is a definition like map3:
This works for all applicatives, though. Is it normal for elm libraries to copy paste code like the map3 definition?
[ Parent
| on HN ]
Not sure what you mean. It's normal that different packages have their own version of a given function, like List.map3, Json.map3 etc. But the implementation is different, so it's not copy-paste. It has to be this way in cases where generic types is not enough and something like interfaces/typeclasses is required.