by platz · 12y ago · 0 comments
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.