从hy源文件构建小型应用程序
hypo的Python项目详细描述
在制品
hypo
要求
- python>;=(2.6,3.5)
- hy>;=0.12.1
安装
$ pip install hypo
使用量
$ hypo --help usage: hypo [options] <targets> options: -o [file] output name --version show program's version number and exit --help show this message and exit
示例
您可以按如下方式生成这些源文件:
$ hypo -o app main.hy iota.hy
您可以按如下方式执行应用程序:
$ ./app (0L 1L 2L 3L 4L 5L 6L 7L 8L 9L)
或
$ python app (0L 1L 2L 3L 4L 5L 6L 7L 8L 9L)
源文件
- Iota.hy
(defn iota[m&optional[n0][step1]](if (>= nm)None(cons n(iotam(+ nstep)step))))
- main.hy
(import [iota[iota]])(defmain[&rest args](print (iota10)))
许可证
分布在MIT License下。