Skip to content

Commit 9a1271b

Browse files
committed
refactor: use consistent names for branch api parameters
1 parent 78f8d51 commit 9a1271b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scafi3-mp-api/shared/src/main/scala/it/unibo/scafi/libraries/PortableBranchingLibrary.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ trait PortableBranchingLibrary extends PortableLibrary:
1414
* This method is used to split the domain of the aggregate program into two branches.
1515
* @param condition
1616
* the condition to be evaluated
17-
* @param thenBranch
17+
* @param trueBranch
1818
* the expression to be evaluated if the condition is true
19-
* @param elseBranch
19+
* @param falseBranch
2020
* the expression to be evaluated if the condition is false
2121
* @tparam Value
2222
* the type of the expression to be evaluated
2323
* @return
2424
* the result of the expression that has been evaluated
2525
*/
2626
@JSExport
27-
def branch[Value](condition: Boolean)(thenBranch: Function0[Value])(elseBranch: Function0[Value]): Value =
28-
branch_(condition)(thenBranch)(elseBranch)
27+
def branch[Value](condition: Boolean)(trueBranch: Function0[Value])(falseBranch: Function0[Value]): Value =
28+
branch_(condition)(trueBranch)(falseBranch)
2929

30-
inline def branch_[Value](condition: Boolean)(thenBranch: Function0[Value])(elseBranch: Function0[Value]): Value =
31-
language.branch(condition)(thenBranch())(elseBranch())
30+
inline def branch_[Value](condition: Boolean)(trueBranch: Function0[Value])(falseBranch: Function0[Value]): Value =
31+
language.branch(condition)(trueBranch())(falseBranch())
3232
end PortableBranchingLibrary

0 commit comments

Comments
 (0)