add_reaction
Stable function · Editing
Tier: stable · Kind: function · Topic: Editing
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
add_reaction | addReaction | add_reaction, add_reaction_to_system | add_reaction | AddReaction |
Note: spelling differs from the §2 rule: python=add_reaction_to_system (expected add_reaction); multiple spellings exported by: python
Julia
add_reaction(system::ReactionSystem, reaction::Reaction)
add_reaction(system::ReactionSystem, reaction::Reaction) -> ReactionSystem
Add a new reaction to a reaction system.
TypeScript
function addReaction(system: ReactionSystem, reaction: Reaction): ReactionSystem
Add a new reaction to a reaction system
Parameters
system— ReactionSystem to add reaction toreaction— Reaction to add
Returns
New reaction system with reaction added
Python
Exported as add_reaction and add_reaction_to_system. Both names refer to the same operation.
add_reaction
add_reaction(reaction_system: ReactionSystem, reaction: Reaction, validate_after_edit: bool = True) -> EditResult
Add a reaction to a reaction system.
add_reaction_to_system
add_reaction_to_system(reaction_system: ReactionSystem, reaction: Reaction, validate_after_edit: bool = True) -> EditResult
Deprecated alias for add_reaction
. Add a reaction to a reaction system.
Rust
pub fn add_reaction(system: &ReactionSystem, reaction: Reaction) -> EditResult<ReactionSystem>
Add a reaction to a reaction system
Arguments
system- The reaction system to modifyreaction- The reaction to add
Returns
EditResult<ReactionSystem>- New reaction system with the added reaction