DEV Community

Discussion on: Keeping decoders simple

Collapse
 
jerzy profile image
Piotr Małecki-Jurek

Hi, the article is great, and explains so much.
Did you thought about replacing

Decode.map4
    (\id species name owner -> Individual id species name owner)
    ...

with

Decode.map4
    Individual
    ...

I think it would be nice to just stress that out. It clears the function a bit more.

Cheers :)

Collapse
 
jwoudenberg profile image
Jasper Woudenberg

Hey, thanks for reading! Yeah, your way is what I usually do in code I write. I was a bit on the fence about the style to use in this post, and ended up deciding for the lambda because I thought that might be more accessible, although that is entirely debatable :).