Pure functions are restricted in that they cannot have side effects or change behavior over time.
Tags
#python #scip
Question
What are ways that pure functions are restricted?
Answer
?
Tags
#python #scip
Question
What are ways that pure functions are restricted?
Answer
Pure functions are restricted in that they cannot have side effects or change behavior over time.
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it Pure functions are restricted in that they cannot have side effects or change
behavior over time.
Original toplevel document
1.2 Elements of Programming this expression produces this peculiar output.
Be careful with print ! The fact that it returns None means that it
should not be the expression in an assignment statement.
>>> two = print(2)
2
>>> print(two)
None
<span>Pure functions are restricted in that they cannot have side effects or change
behavior over time. Imposing these restrictions yields substantial benefits.
First, pure functions can be composed more reliably into compound call
expressions. We can see in the non-pure function example
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.