Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Pure functions can't perform side effects, but they can describe them.

For a functional shell, your program's entry point would be composed of pure functions describing effectful actions to take. The necessary computations get bubbled up to the entry point during evaluation, at which point the runtime / compiled program executes them.

(At least, this is the abstracted perspective you should view the purely functional source code from. The final program itself in practice is, of course, effectful throughout).



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: