Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
463 additions
and
2 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
source/Buoy-Dynamic-Binding-Tests.package/OptionalTest.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
An OptionalTest is a test class for testing the behavior of Optional |
8 changes: 8 additions & 0 deletions
8
...amic-Binding-Tests.package/OptionalTest.class/instance/testForEveryInjectIntoWhenEmpty.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests-Combining | ||
testForEveryInjectIntoWhenEmpty | ||
|
||
| combinedOptional | | ||
|
||
combinedOptional := Optional forEvery: #() injectInto: [ :min :current | self fail ]. | ||
|
||
self assert: (combinedOptional withContentDo: [ :x | self fail ] ifUnused: [ 0 ]) isZero |
17 changes: 17 additions & 0 deletions
17
...inding-Tests.package/OptionalTest.class/instance/testForEveryInjectIntoWhenFirstUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tests-Combining | ||
testForEveryInjectIntoWhenFirstUnused | ||
|
||
| firstOptional secondOptional thirdOptional combinedOptional | | ||
|
||
firstOptional := Optional unused. | ||
secondOptional := Optional containing: 1. | ||
thirdOptional := Optional containing: 3. | ||
|
||
combinedOptional := Optional | ||
forEvery: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
injectInto: [ :min :current | min min: current ]. | ||
|
||
self assert: (combinedOptional withContentDo: [ :min | self fail ] ifUnused: [ 0 ]) isZero |
17 changes: 17 additions & 0 deletions
17
...Binding-Tests.package/OptionalTest.class/instance/testForEveryInjectIntoWhenSomeUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tests-Combining | ||
testForEveryInjectIntoWhenSomeUnused | ||
|
||
| firstOptional secondOptional thirdOptional combinedOptional | | ||
|
||
firstOptional := Optional containing: 1. | ||
secondOptional := Optional unused. | ||
thirdOptional := Optional containing: 3. | ||
|
||
combinedOptional := Optional | ||
forEvery: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
injectInto: [ :min :current | min min: current ]. | ||
|
||
self assert: (combinedOptional withContentDo: [ :min | self fail ] ifUnused: [ 0 ]) isZero |
26 changes: 26 additions & 0 deletions
26
...c-Binding-Tests.package/OptionalTest.class/instance/testForEveryUsedOptionalInjectInto.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
tests-Combining | ||
testForEveryUsedOptionalInjectInto | ||
|
||
| firstOptional secondOptional thirdOptional combinedOptional | | ||
|
||
firstOptional := Optional containing: 1. | ||
secondOptional := Optional containing: 0. | ||
thirdOptional := Optional containing: 3. | ||
|
||
combinedOptional := Optional | ||
forEvery: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
injectInto: [ :min :current | min min: current ]. | ||
|
||
combinedOptional withContentDo: [ :min | self assert: min equals: 0 ] ifUnused: [ self fail ]. | ||
|
||
combinedOptional := Optional | ||
forEvery: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
injectInto: [ :sum :current | sum + current ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self assert: sum equals: 4 ] ifUnused: [ self fail ] |
25 changes: 25 additions & 0 deletions
25
source/Buoy-Dynamic-Binding-Tests.package/OptionalTest.class/instance/testWithAllReturn.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
tests-Combining | ||
testWithAllReturn | ||
|
||
| firstOptional secondOptional thirdOptional combinedOptional | | ||
|
||
firstOptional := Optional containing: 0. | ||
secondOptional := Optional containing: 2. | ||
thirdOptional := Optional containing: 3. | ||
|
||
combinedOptional := firstOptional | ||
withAll: | ||
{secondOptional. | ||
thirdOptional} | ||
return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self assert: sum equals: 5 ] ifUnused: [ self fail ]. | ||
|
||
combinedOptional := Optional | ||
withAll: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self assert: sum equals: 5 ] ifUnused: [ self fail ] |
8 changes: 8 additions & 0 deletions
8
...y-Dynamic-Binding-Tests.package/OptionalTest.class/instance/testWithAllReturnWhenEmpty.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests-Combining | ||
testWithAllReturnWhenEmpty | ||
|
||
| combinedOptional | | ||
|
||
combinedOptional := Optional withAll: #() return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ :explanations | self assert: explanations isEmpty ] |
25 changes: 25 additions & 0 deletions
25
...c-Binding-Tests.package/OptionalTest.class/instance/testWithAllReturnWhenFirstIsUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
tests-Combining | ||
testWithAllReturnWhenFirstIsUnused | ||
|
||
| firstOptional secondOptional thirdOptional combinedOptional | | ||
|
||
firstOptional := Optional unusedBecause: 'This is expected.'. | ||
secondOptional := Optional unusedBecause: 'This is also expected.'. | ||
thirdOptional := Optional containing: 3. | ||
|
||
combinedOptional := firstOptional | ||
withAll: | ||
{secondOptional. | ||
thirdOptional} | ||
return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ :explanations | self assert: explanations equals: #('This is expected.' 'This is also expected.') ]. | ||
|
||
combinedOptional := Optional | ||
withAll: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ :explanations | self assert: explanations equals: #('This is expected.' 'This is also expected.') ] |
25 changes: 25 additions & 0 deletions
25
...c-Binding-Tests.package/OptionalTest.class/instance/testWithAllReturnWhenSomeAreUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
tests-Combining | ||
testWithAllReturnWhenSomeAreUnused | ||
|
||
| firstOptional secondOptional thirdOptional combinedOptional | | ||
|
||
firstOptional := Optional containing: 0. | ||
secondOptional := Optional unused. | ||
thirdOptional := Optional containing: 3. | ||
|
||
combinedOptional := firstOptional | ||
withAll: | ||
{secondOptional. | ||
thirdOptional} | ||
return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ :explanations | self assert: explanations isEmpty ]. | ||
|
||
combinedOptional := Optional | ||
withAll: | ||
{firstOptional. | ||
secondOptional. | ||
thirdOptional} | ||
return: [ :addends | addends sum ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ :explanations | self assert: explanations isEmpty ] |
13 changes: 13 additions & 0 deletions
13
source/Buoy-Dynamic-Binding-Tests.package/OptionalTest.class/instance/testWithContentDo.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
tests-Accessing | ||
testWithContentDo | ||
|
||
| optional expectedContent content | | ||
|
||
expectedContent := 2. | ||
content := 1. | ||
|
||
optional := Optional containing: expectedContent. | ||
|
||
optional withContentDo: [ :theContent | content := theContent ]. | ||
|
||
self assert: content equals: expectedContent |
12 changes: 12 additions & 0 deletions
12
...oy-Dynamic-Binding-Tests.package/OptionalTest.class/instance/testWithContentDoIfUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
tests-Accessing | ||
testWithContentDoIfUnused | ||
|
||
| optional expectedContent content | | ||
|
||
expectedContent := 2. | ||
|
||
optional := Optional containing: expectedContent. | ||
|
||
content := optional withContentDo: [ :theContent | theContent ] ifUnused: [ self fail ]. | ||
|
||
self assert: content equals: expectedContent |
16 changes: 16 additions & 0 deletions
16
...-Binding-Tests.package/OptionalTest.class/instance/testWithContentDoIfUnusedWhenUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
tests-Accessing | ||
testWithContentDoIfUnusedWhenUnused | ||
|
||
| optional defaultContent content expectedExplanation | | ||
|
||
defaultContent := 2. | ||
expectedExplanation := 'The identifier is not configured.'. | ||
optional := Optional unusedBecause: expectedExplanation. | ||
|
||
content := optional | ||
withContentDo: [ :theContent | self fail ] | ||
ifUnused: [ :explanations | | ||
self assertCollection: explanations hasSameElements: {expectedExplanation}. | ||
defaultContent ]. | ||
|
||
self assert: content equals: defaultContent |
10 changes: 10 additions & 0 deletions
10
...-Dynamic-Binding-Tests.package/OptionalTest.class/instance/testWithContentDoWhenUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tests-Accessing | ||
testWithContentDoWhenUnused | ||
|
||
| optional expectedExplanation | | ||
|
||
expectedExplanation := 'The identifier is unassigned'. | ||
|
||
optional := Optional unusedBecause: expectedExplanation. | ||
|
||
optional withContentDo: [ :theContent | self fail ] |
11 changes: 11 additions & 0 deletions
11
source/Buoy-Dynamic-Binding-Tests.package/OptionalTest.class/instance/testWithReturn.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests-Combining | ||
testWithReturn | ||
|
||
| firstOptional secondOptional combinedOptional | | ||
|
||
firstOptional := Optional containing: 1. | ||
secondOptional := Optional containing: 2. | ||
|
||
combinedOptional := firstOptional with: secondOptional return: [ :x :y | x + y ]. | ||
|
||
combinedOptional withContentDo: [ :sum | self assert: sum equals: 3 ] ifUnused: [ self fail ] |
17 changes: 17 additions & 0 deletions
17
...amic-Binding-Tests.package/OptionalTest.class/instance/testWithReturnWhenBothAreUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
tests-Combining | ||
testWithReturnWhenBothAreUnused | ||
|
||
| firstOptional secondOptional combinedOptional | | ||
|
||
firstOptional := Optional unused. | ||
secondOptional := Optional unused. | ||
|
||
combinedOptional := firstOptional with: secondOptional return: [ :x :y | self fail ]. | ||
|
||
self | ||
assert: | ||
(combinedOptional | ||
withContentDo: [ :sum | self fail ] | ||
ifUnused: [ :explanations | | ||
self assert: explanations isEmpty. | ||
0 ]) isZero |
11 changes: 11 additions & 0 deletions
11
...amic-Binding-Tests.package/OptionalTest.class/instance/testWithReturnWhenFirstIsUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests-Combining | ||
testWithReturnWhenFirstIsUnused | ||
|
||
| firstOptional secondOptional combinedOptional | | ||
|
||
firstOptional := Optional unused. | ||
secondOptional := Optional containing: 2. | ||
|
||
combinedOptional := firstOptional with: secondOptional return: [ :x :y | self fail ]. | ||
|
||
self assert: (combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ 0 ]) isZero |
11 changes: 11 additions & 0 deletions
11
...mic-Binding-Tests.package/OptionalTest.class/instance/testWithReturnWhenSecondIsUnused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests-Combining | ||
testWithReturnWhenSecondIsUnused | ||
|
||
| firstOptional secondOptional combinedOptional | | ||
|
||
firstOptional := Optional containing: 2. | ||
secondOptional := Optional unused. | ||
|
||
combinedOptional := firstOptional with: secondOptional return: [ :x :y | self fail ]. | ||
|
||
self assert: (combinedOptional withContentDo: [ :sum | self fail ] ifUnused: [ 0 ]) isZero |
21 changes: 21 additions & 0 deletions
21
source/Buoy-Dynamic-Binding-Tests.package/OptionalTest.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"instance" : { | ||
"testWithContentDoIfUnused" : "GabrielOmarCotelli 3/16/2017 12:18", | ||
"testForEveryInjectIntoWhenSomeUnused" : "GabrielOmarCotelli 3/16/2017 15:14", | ||
"testWithAllReturnWhenEmpty" : "GabrielOmarCotelli 3/16/2017 15:24", | ||
"testForEveryUsedOptionalInjectInto" : "GabrielOmarCotelli 3/16/2017 15:09", | ||
"testWithReturnWhenBothAreUnused" : "GabrielOmarCotelli 3/16/2017 12:29", | ||
"testWithReturnWhenFirstIsUnused" : "GabrielOmarCotelli 3/16/2017 12:31", | ||
"testWithAllReturnWhenSomeAreUnused" : "GabrielOmarCotelli 3/16/2017 15:22", | ||
"testForEveryInjectIntoWhenFirstUnused" : "GabrielOmarCotelli 3/16/2017 15:16", | ||
"testWithContentDoIfUnusedWhenUnused" : "GabrielOmarCotelli 3/16/2017 12:20", | ||
"testWithAllReturn" : "GabrielOmarCotelli 3/16/2017 15:21", | ||
"testWithReturnWhenSecondIsUnused" : "GabrielOmarCotelli 3/16/2017 12:31", | ||
"testForEveryInjectIntoWhenEmpty" : "GabrielOmarCotelli 3/16/2017 15:13", | ||
"testWithContentDo" : "GabrielOmarCotelli 3/16/2017 11:04", | ||
"testWithContentDoWhenUnused" : "GabrielOmarCotelli 3/16/2017 12:20", | ||
"testWithReturn" : "GabrielOmarCotelli 3/16/2017 12:18", | ||
"testWithAllReturnWhenFirstIsUnused" : "GabrielOmarCotelli 3/16/2017 15:22" | ||
}, | ||
"class" : { } | ||
} |
11 changes: 11 additions & 0 deletions
11
source/Buoy-Dynamic-Binding-Tests.package/OptionalTest.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"commentStamp" : "<historical>", | ||
"super" : "TestCase", | ||
"category" : "Buoy-Dynamic-Binding-Tests", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "OptionalTest", | ||
"type" : "normal" | ||
} |
2 changes: 1 addition & 1 deletion
2
source/Buoy-Dynamic-Binding-Tests.package/monticello.meta/version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(name 'Buoy-Dynamic-Binding-Tests-GabrielOmarCotelli.1' message 'Add Binding' id 'c3216def-2b07-0d00-9c08-b1180dc74540' date '15 March 2017' time '4:46:19.133575 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ()) | ||
(name 'Buoy-Dynamic-Binding-Tests-GabrielOmarCotelli.2' message 'Added Optional' id '8c944d20-3f07-0d00-9a97-f70402bbd58a' date '16 March 2017' time '3:40:03.528093 pm' author 'GabrielOmarCotelli' ancestors ((name 'Buoy-Dynamic-Binding-Tests-GabrielOmarCotelli.1' message 'Add Binding' id 'c3216def-2b07-0d00-9c08-b1180dc74540' date '15 March 2017' time '4:46:19.133575 pm' author 'GabrielOmarCotelli' ancestors () stepChildren ())) stepChildren ()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
I'm an abstract class representing the fact that some object can be optional. I provide protocol to be combined with other optionals. |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/class/containing..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Instance Creation | ||
containing: anObject | ||
|
||
^UsedOptional containing: anObject |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/class/forEvery.injectInto..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Instance Creation | ||
forEvery: optionals injectInto: aDyadicBlock | ||
|
||
^ optionals ifNotEmpty: [ optionals first withAll: optionals allButFirst injectInto: aDyadicBlock ] ifEmpty: [ self unused ] |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/class/unused.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Instance Creation | ||
unused | ||
|
||
^self unusedBecauseAll: #() |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/class/unusedBecause..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Instance Creation | ||
unusedBecause: anExplanation | ||
|
||
^self unusedBecauseAll: { anExplanation } |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/class/unusedBecauseAll..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Instance Creation | ||
unusedBecauseAll: anExplanationCollection | ||
|
||
^UnusedOptional explainedByAll: anExplanationCollection |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/class/withAll.return..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Instance Creation | ||
withAll: optionals return: aMonadycBlock | ||
|
||
^ optionals ifNotEmpty: [ optionals first withAll: optionals allButFirst return: aMonadycBlock ] ifEmpty: [ self unused ] |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/instance/with.return..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Combining | ||
with: anOptional return: aDyadicBlock | ||
|
||
^self subclassResponsibility |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/instance/withAll.injectInto..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Combining | ||
withAll: optionals injectInto: aDyadicBlock | ||
|
||
^ optionals inject: self into: [ :combinedOptional :currentOptional | combinedOptional with: currentOptional return: aDyadicBlock ] |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/instance/withAll.return..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Combining | ||
withAll: optionals return: aMonadycBlock | ||
|
||
^self subclassResponsibility |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/instance/withContentDo..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Accessing | ||
withContentDo: aMonadycBlock | ||
|
||
self withContentDo: aMonadycBlock ifUnused: [ ] |
4 changes: 4 additions & 0 deletions
4
source/Buoy-Dynamic-Binding.package/Optional.class/instance/withContentDo.ifUnused..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Accessing | ||
withContentDo: aMonadycBlock ifUnused: aNothingBlock | ||
|
||
^self subclassResponsibility |
Oops, something went wrong.