File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,12 @@ FunctionalTest >> testCycle [
5656
5757{ #category : #tests }
5858FunctionalTest >> testPipeTo [
59- self assert: (1 + > [ :x | x+ 1 ] ) equals: 2 .
60- self assert: ({1 . 2 .} + > [ :a | a sum ] ) equals: 3 .
59+ |inc |.
60+ inc: = [ :x | x+ 1 ].
61+ self assert: (1 + > inc ) equals: 2 .
62+ self assert: ([1 ] + > inc + > inc ) equals: 3 .
63+ self assert: ([2 * 2 - 2 ] + > inc + > inc ) equals: 4 .
64+ self assert: ({3 . 2 .} + > [ :a | a sum ] ) equals: 5 .
6165]
6266
6367{ #category : #tests }
Original file line number Diff line number Diff line change @@ -47,5 +47,5 @@ Object >> nilOr: aBlock [
4747Object >> pipeTo: aBlock [
4848 " pipe : pass value to function ."
4949 " see : +>"
50- ^ aBlock value: self .
50+ ^ aBlock value: self value .
5151]
You can’t perform that action at this time.
0 commit comments