MLStyle

所属分类:人工智能/神经网络/深度学习
开发工具:Julia
文件大小:186KB
下载次数:0
上传日期:2023-03-06 19:04:08
上 传 者sh-1993
说明:  MLStyle.jl,Julia函数式编程基础设施和元编程设施
(MLStyle.jl,Julia functional programming infrastructures and metaprogramming facilities)

文件列表:
.JuliaFormatter.toml (390, 2023-02-13)
LICENSE (1057, 2023-02-13)
Project.toml (381, 2023-02-13)
acknowledgements.txt (477, 2023-02-13)
benchmark.jl (531, 2023-02-13)
build-docs.sh (355, 2023-02-13)
codecov.yml (75, 2023-02-13)
docs (0, 2023-02-13)
docs\Makefile (638, 2023-02-13)
docs\Project.toml (140, 2023-02-13)
docs\benchmark.md (3633, 2023-02-13)
docs\conf.py (6444, 2023-02-13)
docs\contribute.md (374, 2023-02-13)
docs\favicon.ico (29269, 2023-02-13)
docs\how.md (343, 2023-02-13)
docs\index.rst (1262, 2023-02-13)
docs\make.bat (763, 2023-02-13)
docs\make.jl (910, 2023-02-13)
docs\make.sh (38, 2023-02-13)
docs\modules (0, 2023-02-13)
docs\modules\ast.md (2134, 2023-02-13)
docs\modules\cond.md (336, 2023-02-13)
docs\preview.md (2779, 2023-02-13)
docs\pygments_julia.py (34142, 2023-02-13)
docs\syntax (0, 2023-02-13)
docs\syntax\adt.md (3236, 2023-02-13)
docs\syntax\pattern-function.md (1160, 2023-02-13)
docs\syntax\pattern.md (21895, 2023-02-13)
docs\syntax\records.md (724, 2023-02-13)
docs\syntax\switch.md (1055, 2023-02-13)
docs\syntax\when.md (2189, 2023-02-13)
docs\tutorials (0, 2023-02-13)
... ...

# MLStyle.jl

[![CI](https://github.com/thautwarm/MLStyle.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/thautwarm/MLStyle.jl/actions) [![codecov](https://codecov.io/gh/thautwarm/MLStyle.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/thautwarm/MLStyle.jl) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/LICENSE) [![Docs](https://img.shields.io/badge/docs-latest-purple.svg)](https://thautwarm.github.io/MLStyle.jl/latest/) [![Join the chat at https://gitter.im/MLStyle-jl/community](https://badges.gitter.im/MLStyle-jl/community.svg)](https://gitter.im/MLStyle-jl/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) Providing intuitive, fast, consistent and extensible functional programming infrastructures, and metaprogramming facilities. Check everything in the [documentation website](https://thautwarm.github.io/MLStyle.jl/latest/). ## Preview ```julia using MLStyle @data Shape begin # Define an algebraic data type Shape Rock Paper Scissors end # Determine who wins a game of rock paper scissors with pattern matching play(a::Shape, b::Shape) = @match (a, b) begin (Paper, Rock) => "Paper Wins!"; (Rock, Scissors) => "Rock Wins!"; (Scissors, Paper) => "Scissors Wins!"; (a, b) => a == b ? "Tie!" : play(b, a) end ``` P.S: When preferring `Base.@enum` than `MLStyle.@data`, [you need this to pattern match on Julia `Base.@enum`](https://thautwarm.github.io/MLStyle.jl/latest/syntax/pattern.html#support-pattern-matching-for-julia-enums). ## Benchmarks ### Arrays - code: [matrix-benchmark/bench-array.jl](https://github.com/thautwarm/MLStyle.jl/blob/master/matrix-benchmark/bench-array.jl) [![matrix-benchmark/bench-array.jl](https://raw.githubusercontent.com/thautwarm/MLStyle.jl/master/stats/bench-array.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/stats/bench-array.txt) ### Tuples - code: [matrix-benchmark/bench-tuple.jl](https://github.com/thautwarm/MLStyle.jl/blob/master/matrix-benchmark/bench-tuple.jl) [![matrix-benchmark/bench-tuple.jl](https://raw.githubusercontent.com/thautwarm/MLStyle.jl/master/stats/bench-tuple.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/stats/bench-tuple.txt) ### Data Types - code: [matrix-benchmark/bench-datatype.jl](https://github.com/thautwarm/MLStyle.jl/blob/master/matrix-benchmark/bench-datatype.jl) [![matrix-benchmark/bench-datatype.jl](https://raw.githubusercontent.com/thautwarm/MLStyle.jl/master/stats/bench-datatype.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/stats/bench-datatype.txt) ### Extracting Struct Definitions - code: [matrix-benchmark/bench-structfields.jl](https://github.com/thautwarm/MLStyle.jl/blob/master/matrix-benchmark/bench-structfields.jl) [![matrix-benchmark/bench-structfields.jl](https://raw.githubusercontent.com/thautwarm/MLStyle.jl/master/stats/bench-structfields.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/stats/bench-structfields.txt) ### Misc - code: [matrix-benchmark/bench-misc.jl](https://github.com/thautwarm/MLStyle.jl/blob/master/matrix-benchmark/bench-misc.jl) [![matrix-benchmark/bench-misc.jl](https://raw.githubusercontent.com/thautwarm/MLStyle.jl/master/stats/bench-misc.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/stats/bench-misc.txt) ### An Example from Match.jl Documentation - code: [matrix-benchmark/bench-vs-match.jl](https://github.com/thautwarm/MLStyle.jl/blob/master/matrix-benchmark/bench-vs-match.jl) [![matrix-benchmark/bench-versus-match.jl](https://raw.githubusercontent.com/thautwarm/MLStyle.jl/master/stats/bench-versus-match.svg)](https://github.com/thautwarm/MLStyle.jl/blob/master/stats/bench-vs-match.txt) ## Acknowledgements Thanks to all individuals referred in [Acknowledgements](https://github.com/thautwarm/MLStyle.jl/blob/master/acknowledgements.txt)!

近期下载者

相关文件


收藏者