[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Function
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 10
Thread images: 1
File: Function.png (6 KB, 220x218) Image search: [Google]
Function.png
6 KB, 220x218
A function:
> is a program organization unit that returns one immediate result.
> is directly called with its name (not through an instance).
> has no persistent state from one call to the other.
> can be used as an operand in other expressions.
>>
That's nice, anon.
>>
>>54975825
Also only has 1 input

Functional languages can do this with multiples due to currying, so it is still technically 1 argument
>>
>>54976256
Only works with lexical scoping which isn't included in OP's definition.
>>
>>54976256
It is calles tuples
>>
>>54976256
N arguments can always be condensed into 1 argument, so that's a pointless clarification to volunteer.
>>
>>54975825
this is true but only for basic programming functions
>>
A function doesn't always return something for example void functions
>>
>>54978651
Those are procedures
>>
>>54975825
I'll take only D.
Unless you condense multivalues, but that's cheating as >>54977698 said.
Thread replies: 10
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.