Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: How does Common Lisp deal with side effects?.
So you have to be disciplined. I stick to the following rules:
* have a (main) function
* prefix io functions with io- and only use them in (main) (inspired by Haskell)
* No loop. Always recursion.
* No variables. No local ones and definitely no global ones.
That way, you have to think more in functional terms than in imperative ones.
Helps me. Your mileage might vary.
There are no comments on this comment yet.
So you have to be disciplined. I stick to the following rules:
* have a (main) function
* prefix io functions with io- and only use them in (main) (inspired by Haskell)
* No loop. Always recursion.
* No variables. No local ones and definitely no global ones.
That way, you have to think more in functional terms than in imperative ones.
Helps me. Your mileage might vary.