全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Pure function?

Definition 23.8 High School Computer Science · 第 23 章 — Classes and Objects

A pure function is a function whose result depends only on its arguments and which changes nothing outside itself: no global variable, no attribute, no printing, no file.

The same computation in three styles. Real programs mix them: the object version uses a functional sum, and the methods of a class are often written imperatively.
The same computation in three styles. Real programs mix them: the object version uses a functional sum, and the methods of a class are often written imperatively.
在原文中阅读 →