We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efa3d6a commit 148dbf2Copy full SHA for 148dbf2
src/MuTalk-Tests/MTFakeInfiniteLoopForTest.class.st
@@ -5,17 +5,17 @@ Class {
5
#package : 'MuTalk-Tests'
6
}
7
8
-{ #category : 'not defined protocol' }
+{ #category : 'factorials' }
9
MTFakeInfiniteLoopForTest >> iterativeFactorial: anInt [
10
11
| factorial i |
12
^ anInt = 1
13
ifTrue: [ 1 ]
14
- ifFalse: [
+ ifFalse: [
15
factorial := 1.
16
i := 2.
17
"Use a whileTrue: so a mutation can introduce an infinite loop here"
18
- [ true ] whileTrue: [
+ [ i <= anInt ] whileTrue: [
19
factorial := factorial * i.
20
i := i + 1 ].
21
factorial ]
0 commit comments