OxL Reference

op |>

|>

Defined in

Examples

oxl
operator <|> <T>(a: Parser<T>, b: Parser<T>) -> Parser<T>  infixl 3 => a.orElse(b)
operator ~~ (s: str, re: Regex) -> bool                      infix 4 => re.matches(s)
operator ^^ (a: f64, b: f64) -> f64                          infixr 12 => a.pow(b)
operator ¬ (b: Bits) -> Bits                                prefix => b.invert()

— 5.3 Overloading and user-defined operators

oxl
use std.time { Duration, now }
use std.http.{Client as Http}
use self.billing { charge }      // a module of one's own package
use super.common { Money }       // the parent module
use auth.tokens { verify }       // a dependency from oxl.toml
use parsers { <|> }              // importing an operator
use std.coll.*                   // all pub names (a warning in libraries)

— 2.2 Import

Related diagnostics

chained-comparison, not-callable, not-overloadable, operator-decl, range-not-iterable, invalid-char, bad-import-root, glob-import, import-conflict, unresolved-import, unresolved-name

See also