Merge branch 'master' of https://github.com/crista/exercises-in-programming-style
This commit is contained in:
@@ -3,13 +3,21 @@ Style #9
|
|||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|
||||||
- Existence of an abstraction to which all functions can be converted. This
|
- Existence of an abstraction to which values can be
|
||||||
main abstraction provides an interface to (1) wrap around values, so that they
|
converted.
|
||||||
become the abstraction; and (2) bind wrapped values to functions, so
|
|
||||||
to establish sequences of functions.
|
- This abstraction provides operations to (1) wrap
|
||||||
|
around values, so that they become the abstraction; (2) bind
|
||||||
|
itself to functions, so to establish sequences of functions;
|
||||||
|
and (3) unwrap the value, so to examine the final result.
|
||||||
|
|
||||||
|
- Larger problem is solved as a pipeline of functions bound
|
||||||
|
together, with unwrapping happening at the end.
|
||||||
|
|
||||||
|
- Particularly for The One style, the bind operation simply
|
||||||
|
calls the given function, giving it the value that it holds, and holds
|
||||||
|
on to the returned value.
|
||||||
|
|
||||||
- Larger problem is solved as a pipeline of functions bound together
|
|
||||||
by the single interface that chains them.
|
|
||||||
|
|
||||||
Possible names:
|
Possible names:
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #12
|
Style #11
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #13
|
Style #12
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #14
|
Style #13
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #11
|
Style #14
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #25
|
Style #15
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Similar to the letterbox style, but where the 'things' have
|
Similar to the letterbox style, but where the 'things' have
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #15
|
Style #16
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #16
|
Style #17
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #17
|
Style #18
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #18
|
Style #19
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Style #19
|
Style #20
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
Style #25
|
Style #25
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
This style is a variation of style #09, The One, with the following additional constraints:
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|
||||||
- Core program functions have no side effects of any kind, including IO
|
- Core program functions have no side effects of any kind, including IO
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Style #30
|
Style #30
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Very similar to style #12, but with an additional twist
|
Very similar to style #29, but with an additional twist
|
||||||
|
|
||||||
Constraints:
|
Constraints:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user