Functional Programming Flashcards

1
Q

What is a lambda ?

A

An anonymous function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Predefined Functional Interface - Predicate

A

Generic type
Check a condition, returns true or false
Primitive specializations exist
Predicate<T>
T-> boolean</T>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Predefined Functional Interface - Consumer

A

Accepts an argument and returns nothing
Consumer<T>
T-> void</T>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Predefined Functional Interface - Function

A

Accepts type T, Returns type R
performs a function
Primitive specializations exist
Function<T,R>
T->R

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Predefined Functional Interface - Supplier

A

takes nothing but supplier something of type T
Supplier<T>
()->T</T>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Predefined Functional Interface - Unary

A

Accepts type T and returns a result of the same type
UnaryOperator<T>
T->T</T>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Predefined Functional Interface - BinaryOperator<T>
(T,T)->T</T>

A

BinaryOperator<T>
(T,T)->T</T>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Predefined Functional Interface -
BiPredicate

A

BiPredicate<L,R>
(L,R)->boolean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Predefined Functional Interface -
BiConsumer

A

BiConsumer<T,U>
(T,U)-> void

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly