In functional programming, lambdas are referred to as first-class functions because they can be.
在函数式编程中,lambdas被称为一流的函数因为它们能够。
In this article, I'll continue this tour of concepts by talking about first-class functions, optimizations, and closures.
在本文中,我将继续讨论这些概念,讲解一级函数、优化和闭包。
Specifically, functional programming languages must provide high-order and first-class functions, which this article defines.
特别地,函数式编程语言必须提供高阶和一流的函数,这是本文所定义的。
In functional programming, you have far fewer abstractions, but each one is generic (with specificity added via first-class functions).
在函数式编程中,您拥有更少的抽象,但是每个抽象都具有通用性(通过一等函数添加特性)。
Predicate (which is the is-factor method I defined earlier in Listing 2 - note the heavy use of first-class functions), returning the Numbers that match.
谓词(我在之前的清单2中定义的is - factor方法—请注意一类函数的大量使用),返回匹配的数字。
You can see that once you become accustomed to thinking in terms of higher-order and first-class functions, you can reduce (pun intended) a lot of noise in your code.
您会看到,一旦您习惯了从高阶和一级函数的角度思考,您就能减少(一语双关)代码中无用的部分。
Functional languages rely on first-class functions (functions that can appear anywhere any other language construct can appear) as parameters and return values. Figure 3 illustrates this concept.
函数式语言依赖于一等函数(可在任何其他语言结构可能出现的地方出现的函数)作为参数和返回值。
Functional language constructs such as higher-order and first-class functions allow me to climb one more rung up the abstraction ladder and focus more on what the code does rather than how it does it.
函数语言结构,如高阶和一级函数,能让我对抽象的理解更进一步,让我更多地将精力放在代码能做什么而不是怎么做 上。
They see the world in terms of data, and data relationships, and tend to populate their classes first with data -- usually with no strategy on how to assign operations (i.e., functions) to the class.
他们就是用数据和数据之间的关系来认识、描述世界的,因此会首先去寻找类中的数据-一般没有什么标准的方法去寻找类的函数或功能。
In fact, this is precisely what's taking place: in a functional language, functions are first-class concepts, like variables and constants, and so are syntactically treated as such.
事实上,真正发生的事情是:在函数语言中,就像变量和常量一样,函数是一级概念,所以语法上也是一样地处理。
Functions are “first-class” citizens in FP, meaning they can be assigned to variables, passed to other functions, etc., just like other values.
函数是FP 的一类公民,这意味着它们可以被赋值给变量,被传递给其他函数等,就像普通的值一样。
Functions in a functional language are considered first class, meaning that functions can appear anywhere that any other language construct (such as variables) can appear.
函数式语言中的函数称为一级函数,这意味着函数可在任何其他语言结构(比如变量)可能出现的地方出现。
First-class methods and functions (closures)
一流的方法和函数(闭包)
Games room equipped with various functions, advanced level of first-class information network system.
各种功能场室装备先进,信息网络系统水平一流。
You have two ways to differentiate your new derived class from the original base class it inherits from. The first is quite straightforward: you simply add brand new functions to the derived class.
你有两种方法去区分衍生类和它所继承的原始基类:你可以简单的为衍生类加入标识性的方法。
A first-class comprehensive building with complex functions always has complex fire-fighting system design.
一座功能复杂的综合性一类建筑,其消防系统的设计也比较复杂。
Or, put more accurately, functions should be treated as first-class citizens within the language: they can be created, passed to methods and returned from methods just as other values are.
或者,更准确地说,功能应视为语言中的一流公民:他们可以创建、传递给方法和方法返回正如其他值。
Since our class functions as a writing community and the first "public" for your essays and fiction, it is essential that you attend class faithfully.
我们的课程的运作方式是一个小型的写作社群以及属于你们作品的首度公开,你们应该忠实地来上课。
Complete with complete functions, have the first-class quality testing, inspection facilities.
配套建有功能齐全的质检室,拥有一流的化验、检验设施。
Hotel style, elegance, first-class facilities, set housing, food, entertainment, Leisure and business functions as one.
酒店格调高雅,设施一流,集住房、餐饮、娱乐、休闲、商务功能为一体。
I freely admit to being jealous of functions as first-class objects, for instance.
我坦率承认,被嫉妒的职能一流的对象,例如。
I freely admit to being jealous of functions as first-class objects, for instance.
我坦率承认,被嫉妒的职能一流的对象,例如。
应用推荐