1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use melodium_macro::mel_function;

pub mod char;
pub mod float;

/// Return the smallest value that can be represented by the type.
#[mel_function(
    generic B (Bounded)
)]
pub fn min() -> B {
    let b = generics.get("B").unwrap();

    b.bounded_min()
}

/// Return the highest value that can be represented by the type.
#[mel_function(
    generic B (Bounded)
)]
pub fn max() -> B {
    let b = generics.get("B").unwrap();

    b.bounded_max()
}