承接 kapitancho/walnut-lang-cli-adapter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-02-29