Skip to content

Instantly share code, notes, and snippets.

View liquidhelium's full-sized avatar
🛌
Embedded developer.

液氦 liquidhelium

🛌
Embedded developer.
  • Unknown
View GitHub Profile
// 定义零:作为自然数的起点
struct Zero;
// 定义后继:Succ<N> 表示自然数 N 的后继(即 N + 1)
struct Succ<N>(N);
// 为自然数定义特性
trait Natural {
// 获取数值(运行时)
fn value() -> usize;