kapitancho/walnut-lang-cli-adapter
最新稳定版本:0.0.6
Composer 安装命令:
composer require kapitancho/walnut-lang-cli-adapter
包简介
README 文档
README
A small adapter for performing CLI calls to Walnut language code.
Installation
To install the latest version, use the following command:
$ composer require kapitancho/walnut-lang-cli-adapter
Usage
module demo-cli:
calc = ^Array<String> => Result<Integer, Any> ::
?noError(?noError(#->item(0))->asInteger) +
?noError(?noError(#->item(1))->asInteger);
main = ^Array<String> => String :: {
s = calc(#);
?whenTypeOf(s) is {
type{Integer}: s->asString,
~: 'Invalid parameters'
}
};
php -f cli.php demo-cli 1 2
# Output: 3
php -f cli.php demo-cli 3 cats
# Output: Invalid parameters
Examples
You can browse the examples repository.
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-02-29