Comment

Comment by galaxyLogic

A "function" is a "function" if it always returns the same result for the same arguments, right?

Now I'm trying to wrap my head around how can I call a function which takes no arguments but which returns a value the user entered on the keyboard? How can I write a function which returns the current mouse-position on the screen, while still abiding by the functional principle of same result for same arguments always?

Can it be done? If not can we still call it "functional"?

parent galaxyLogic 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton