How can you be sure it’s not defined when we only see one line?
Comment on I dunno
ExtremeDullard@piefed.social 3 weeks ago
5 isn’t a valid function name, is obviously the right answer.
TheRedSpade@lemmy.world 3 weeks ago
Voroxpete@sh.itjust.works 2 weeks ago
They didn’t say it’s not defined, they said it’s not a valid name. Most languages don’t allow function names to start with a number, so 5 literally cannot be a function if that’s the case…
But that’s assuming this isn’t some really obscure language.
SmartmanApps@programming.dev 3 days ago
so 5 literally cannot be a function if that’s the case
No, but it can be and is a coefficient of the Term 5(8-5)
gnutrino@programming.dev 2 weeks ago
It could be a Church Numeral in which case function application is the same as addition and the answer is actually 10…
merc@sh.itjust.works 2 weeks ago
Depends on the language.
SmartmanApps@programming.dev 3 days ago
Depends on the language
No it doesn’t
merc@sh.itjust.works 3 days ago
Yes it does.
SmartmanApps@programming.dev 3 days ago
Yes it does
Says person who can’t cite a single example of it depending on the language 🙄
marcos@lemmy.world 2 weeks ago
I’m pretty sure that’s a module operator…
SmartmanApps@programming.dev 3 days ago
5 is a coefficient of the Term 5(8-5) is the correct answer