5 ms·
Another suggestion would be more examples under the clear concise code bit--possibly in a carousel. Additionally, all examples could be loaded into the "Try It
by cordite 12y ago
Another suggestion would be more examples under the clear concise code bit--possibly in a carousel.
Additionally, all examples could be loaded into the "Try It" section, so I could type `take 4 primes` or something.
Instead, in my attempt to load the primes function.. I was met with this bit.
λ let sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0]
can't find file: Imports.hs
- deleted 12y ago[deleted]
- themodelplumber 12y agoI got that too. I was surprised to realize that I felt ready to completely give up on the language after seeing only that message.
- groovy2shoes 12y agoI agree, but I'd go even further: make the example in the corner actually tryable the "Try It" section. For this example: primes = sieve [2..] where sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0] I tried to type it into the shell: λ primes = sieve [2..] <hint>:1:8: parse error on input `=' It doesn't work. Okay, what if I copy and paste? λ primes = sieve [2..] where sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0] <hint>:1:8: parse error on input `=' Doesn't work. Now, I know enough about Haskell to know what I can and can't type into ghci, but what about people who are encountering Haskell for the first time? They'll try to run the given example in the "Try It" section and will get nothing but errors. Just my two cents. P.S. Is Haskell still avoiding success at all costs? (A philosophy I continue to be okay with, but it seems to getting futile :) )
- axman6 12y agoHaskell is still avoiding (success at all costs), the bracketing is very important. Haskell may seem like a slow to develop language and community at times, but this is because most users want to see well thought out solutions to problems, and if they have theoretical backgrounds showing that what they're doing is a good idea, even better.