Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



The behavior we require to implement a pair is that it glues two values together. Stated as a behavior condition,

  • If a pair p was constructed from values x and y , then select(p, 0) returns x , and select(p, 1) returns y .
If you want to change selection, open document below and click on "Move attachment"

2.2 Data Abstraction
ew can be applied broadly, including to the pair values that we used to implement rational numbers. We never actually said much about what a pair was, only that the language supplied the means to create and manipulate lists with two elements. <span>The behavior we require to implement a pair is that it glues two values together. Stated as a behavior condition, If a pair p was constructed from values x and y , then select(p, 0) returns x , and select(p, 1) returns y . We don't actually need the list type to create pairs. Instead, we can implement two functions pair and select that fulfill this description just as well as a two-element list.


Summary

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Details



Discussion

Do you want to join discussion? Click here to log in or create user.