Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Replace existing hello world and quicksort snippets #708
Currently, the https://github.com/exercism/haskell/blob/master/docs/ABOUT.md has a quicksort code snippet, and the https://github.com/exercism/haskell/blob/master/docs/SNIPPET.txt has hello-world
Your task is to find a new snippet that is suitably representative of the language. The limits imposed in https://github.com/exercism/docs/blob/master/language-tracks/documentation/introductory-copy.md are a 10 line maximum length and a 40 character maximum width.
When you find one, you should:
I started thinking about this. I would like opinions on the following classic for a code snippet:
fib :: [Int] fib = 0:1:zipWith (+) fib (tail fib)
I love this one, but I'm a bit torn on the question if it's the right snippet to choose.
I will continue looking for other good short snippets, so far I haven't found the perfect one yet. I quite like the Python one for example, because it communicates usefulness and beginner-friendliness, while being a good deal less trivial than Hello-World.
I acknowledge these as true, and I think they can be addressed by adding some explanatory comments to the code, and an example of how you would use
I agree that it is interesting to expose the new way of looking at things.
Other ideas for possible places to find:
I would wonder if https://wiki.haskell.org/Example_code has something, but not all of the examples there are optimised for the use case and requirements here (short, but give a taste of the language). There may be some out there, just don't know about them. https://rosettacode.org/wiki/Category:Haskell is a big list, but it is probably too big to go through quickly and find a suitable.
Since this snippet's purpose is to provide an introduction, I had an idea of searching for "introduction to Haskell" and found pages like https://www.schoolofhaskell.com/school/starting-with-haskell/introduction-to-haskell/1-haskell-basics . I wonder if there's anything there.