@@ -1397,15 +1397,15 @@ public class ProgramBuilder {
13971397
13981398 ///
13991399 /// Adoption of variables from a different program.
1400- /// Required when copying instructions between program .
1400+ /// Required when copying instructions between programs .
14011401 ///
14021402 private var varMaps = [ VariableMap < Variable > ] ( )
14031403
1404- /// Prepare for adoption of variables from the given program.
1404+ /// Prepare for adoption of variables from another program.
14051405 ///
1406- /// This sets up a mapping for variables from the given program to the
1406+ /// This sets up a mapping for variables from another program to the
14071407 /// currently constructed one to avoid collision of variable names.
1408- public func beginAdoption( from program : Program ) {
1408+ public func beginAdoption( ) {
14091409 varMaps. append ( VariableMap ( ) )
14101410 }
14111411
@@ -1414,9 +1414,9 @@ public class ProgramBuilder {
14141414 varMaps. removeLast ( )
14151415 }
14161416
1417- /// Executes the given block after preparing for adoption from the provided program .
1418- public func adopting( from program : Program , _ block: ( ) -> Void ) {
1419- beginAdoption ( from : program )
1417+ /// Executes the given block after preparing for adoption.
1418+ public func adopting( _ block: ( ) -> Void ) {
1419+ beginAdoption ( )
14201420 block ( )
14211421 endAdoption ( )
14221422 }
@@ -1453,7 +1453,7 @@ public class ProgramBuilder {
14531453 /// This also renames any variable used in the given program so all variables
14541454 /// from the appended program refer to the same values in the current program.
14551455 public func append( _ program: Program ) {
1456- adopting ( from : program ) {
1456+ adopting ( ) {
14571457 for instr in program. code {
14581458 adopt ( instr)
14591459 }
0 commit comments