Java vavr Flashcards

(7 cards)

1
Q

Vad är given in BDD context?

A

Stubbar return värde. Står för behavior driven development

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

What is side effects?

A

Common side effects are changing objects or variables in place, printing to the console, writing to a log file or to a database. Side-effects are considered harmful if they affect the semantics of our program in an undesirable way.

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

Referential transparency

A

In analytic philosophy and computer science, referential transparency and referential opacity are properties of linguistic constructions,[a] and by extension of languages. A linguistic construction is called referentially transparent when for any expression built from it, replacing a subexpression with another one that denotes the same value[b] does not change the value of the expression.

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

When is a function called pure?

A

A function is called pure if all expressions involved are referentially transparent.

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

1.3.1 Mutable data structures
What are the main concept that java collections framework is built upon?

A

We encapsulate state in objects to achieve data hiding and provide mutator methods to control the state

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

What is either .fold

A

Signature (conceptually):

fold(
onLeft: (L) -> T,
onRight: (R) -> T
) -> T

If the Either is Left, onLeft is executed

If the Either is Right, onRight is executed

Both must return the same type T

fold returns that T

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