有没有介绍做私家导游的网站,网站建设氺金手指排名11,潍坊公司注册,ui设计学什么专业MoonBit更新
1. 新增矩阵函数的语法糖
新增矩阵函数的语法糖#xff0c;用于方便地定义局部函数和具有模式匹配的匿名函数#xff1a;
fn init {fn boolean_or { // 带有模式匹配的局部函数true, _ true_, true true_, _ false}fn apply(f, x) {f(x)}le…MoonBit更新
1. 新增矩阵函数的语法糖
新增矩阵函数的语法糖用于方便地定义局部函数和具有模式匹配的匿名函数
fn init {fn boolean_or { // 带有模式匹配的局部函数true, _ true_, true true_, _ false}fn apply(f, x) {f(x)}let _ apply(fn { x x 1 }, 42) // 匿名函数let _ apply(fn { // 带有模式匹配的匿名函数0 01 1_ 2}, 42)
}2. 新增使用 T::{ ... }构造结构体的语法
这个新语法可用于显式的指定结构体的类型并会使得结构体内有更好的补全
struct T {x: Inty: Int
}struct T2 {x: Inty: Int
}fn init {let x T::{x: 1, y: 2}debug(x.x x.y) // 3
}3. 正式移除 var id expr 的语法
4. 增加了新的关键词 test
新的测试语法 test name {}用于代替原先的fn test_name(){}。目前暂时只有顶格缩进的test会被识别成关键字未来将不再支持使用test作为标识符。 旧语法: fn test_ name {} 新语法: test name {}
5. 支持在 init 或者 test 代码块中使用 return 语句
fn init {if i 0 { return}...
}test {if i 0 {return}...
}插件更新
改进了语法高亮
Before:
After:
mooncakes.io 更新
1. 新增 mooncakes.io 注册方式
现在mooncakes.io 支持使用用户名邮箱方式注册而不仅限于之前的GitHub登录方式。现在新用户可以抢先注册你心仪的用户名。注意用户名字符需要5如果小于5需要联系管理员后台操作。
$ moon register
Choose a way to register: Email
You chose: Email
Username: xxxxxx
Password: [hidden]
Email: xxxxxxxxx.xx
Send verification code to your email[bzy_sustechfoxmail.com]? yes
Please input the verification code: xxxxxx
Register successfully!
API token saved in ~/.moon/credentials.json2. 增加跳转到源代码的功能