加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
util 940 Bytes
一键复制 编辑 原始数据 按行查看 历史
RenHaotian 提交于 2018-02-06 10:25 . Add readme.
qsort
[ [ l ] [ if eq thing "l [ ] [ output [ ] ] [ make "x first thing "l make "xs butfirst thing "l make "singleElementList [ [ x ] [ output butlast list thing "x 0.0 ] ] make "getLeft [ [ a xxs ] [ if eq thing "xxs [ ] [ output [ ] ] [ make "x first thing "xxs make "xs butfirst thing "xxs output sentence if not gt thing "x thing "a [ singleElementList thing "x ] [ [ ] ] getLeft thing "a thing "xs ] ] ] make "getRight [ [ a xxs ] [ if eq thing "xxs [ ] [ output [ ] stop ] [ make "x first thing "xxs make "xs butfirst thing "xxs output sentence if gt thing "x thing "a [ singleElementList thing "x ] [ [ ] ] getRight thing "a thing "xs ] ] ] output sentence sentence qsort getLeft thing "x thing "xs singleElementList thing "x qsort getRight thing "x thing "xs ] ] ]
fact
[ [ n ] [ if eq thing "n 0.0 [ output 1.0 ] [ output mul thing "n fact sub thing "n 1.0 ] ] ]
pi
[ [ ] [ output 3.14159 ] ]
run
[ [ l ] [ repeat 1.0 thing "l ] ]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化