摘要:
`Option` and `Result` are two very central enums in Rust, and they are used for error handling and for representing the absence of a value. Here is a 阅读全文
posted @ 2023-05-24 13:57
Zhentiw
阅读(92)
评论(0)
推荐(0)
摘要:
Typescript: import fs from "fs"; const fileName = process.argv[2]; if (fileName) { fs.readFileSync(fileName) .toString() .split("\n") .map((num) => pa 阅读全文
posted @ 2023-05-24 13:52
Zhentiw
阅读(25)
评论(0)
推荐(0)
摘要:
Typescript: function practice(nums: number[], index: number): number { return (nums[index] ?? index) * 5 } In Rust: fn practice(nums: Vec<usize>, inde 阅读全文
posted @ 2023-05-24 01:24
Zhentiw
阅读(15)
评论(0)
推荐(0)

浙公网安备 33010602011771号