2 ms·
Something looks wrong to me though: a = input(‘coefficient of x squared’) is not a function. Well, it's not a function in a mathematical sense - an entity that
by smsm42 5y ago
Something looks wrong to me though: a = input(‘coefficient of x squared’) is not a function. Well, it's not a function in a mathematical sense - an entity that provides a mapping between two sets (with some bells and whistles but let's leave it aside for now). Since the result of this "function" does not depend in any way on the input parameter and can be anything, that doesn't look like a functional solution of anything, it's just declaring that the issue does not exist. I mean, most non-functional languages don't care their functions aren't functions, and they are completely fine with it. But if you specifically declare you're going for functional approach and mention Haskell and IO monads, maybe you should?