Standard Library: Core
The core module provides foundational types and utilities for the MIND language.
Key Exports
Option<T>— Represents an optional value.Result<T, E>— Standard error handling type.panic!— Terminates execution with an error message.assert!— Runtime assertions for debugging.
Example Usage
use core::{Option, Result};
fn divide(a: f32, b: f32) -> Result<f32, String> {
if b == 0.0 {
return Err("division by zero".to_string());
}
Ok(a / b)
}