Erlang中的匹配模式总结
时间:2023-12-28 15:07:05 来源:网络 作者:网络 阅读:
一、赋值时匹配
原子匹配
atom = atom % atom
another = another % another
atom = another % exception error
变量匹配
Var = 2. % 2
Var = 3 - 1. % 2
Var = 1. % exception error
元组匹配
Attr = {name, sloger}. % {name, sloger}
{name, Name} = Attr. % {name, sloger}
本文配套模板、静态源码可前往艾立兹素材库alisucai.com下载
发表评论
共有0条评论
扫码关注公众号
获取全套技术教程