Comment

Comment by platz

Frequently there will be many different ways to solve or architect a problem in Haskell, for better or worse depending on your viewpoint. Personally I think it it is better.

But anyways, another option would be to make a type for your list which wraps each possible element, then you can just pattern match on the ADT.

Also slightly concerned that this has language targeting beginners with almost 0 Haskell knowledge: I am not sure quick anecdotes like this will do more to help than confuse complete beginners.

I still think those interested should start with LYAH which does a good job giving enough context with the flurry of new things to learn.

I suppose it's inevitable if haskell gets more popular there will be more posts like this (which i like) but I'm not sure if its the right way to onboard newcomers.

parent platz 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton