Current section
Files
Jump to
Current section
Files
src/calculator.gleam
//// Simple arithmetic functions
/// Add two numbers together
pub fn add(x: Int, y: Int) -> Int {
x + y
}
/// Subtract the second arg from the first arg
pub fn subtract_by(x: Int, y: Int) -> Int {
x - y
}
/// Multiply two numbers
pub fn multiply(x: Int, y: Int) -> Int {
x * y
}
/// Divide the first arg by the second arg
pub fn divide_by(x: Int, y: Int) -> Int {
x / y
}