[Haskell-cafe] Stack data structure
fa-ml at ariis.it
Sat Dec 8 11:02:50 UTC 2018
On Sat, Dec 08, 2018 at 01:38:52AM +0100, daniel huebleitner wrote:
> I am a graduate student in theoretical computer science playing around with
> haskell for the past year or so. I wrote a Stack Data structure today and
> would like to get some feedback from more experienced haskellers if
The (small) tings I noticed:
- For haddock purposes, comments should start with |, but only the first
-- | returns the empty stack
- `data Stack a` could well become `newtype Stack a` since there is
only one constructor/field in it.
- hlint picks up a redundant pair of brackets on line 51.
I personally don't mind attached code but maybe the `text/x-haskell`
directive isn't handled gracefully by all clients.
I played around with it on ghci and everything seemed fine!
More information about the Haskell-Cafe