Coder Social home page Coder Social logo

niltok / magic-in-ten-mins Goto Github PK

View Code? Open in Web Editor NEW
754.0 8.0 37.0 32.23 MB

十分钟魔法练习

Home Page: https://magic.huohuo.moe

License: Creative Commons Attribution 4.0 International

JavaScript 0.84% HTML 98.52% CSS 0.64%
adt java monad lambda-calculus functional-programming hkt tutorial formal-verification formal-proofs

magic-in-ten-mins's People

Contributors

geekya215 avatar niltok avatar photonquantum avatar tiancaiamao avatar tonyxty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magic-in-ten-mins's Issues

想法真挺好,不过...

可以PR硬件电路、Linux驱动编写的内容吗,比如我有快速入门系列的文章,比如”手撕运放“等,想PR,但这里好像都是java的软件的,好像画风差别有点大...

关于 StateMonad 的实现与 fib 的例子

我对 put 的实现有一些疑问(

// 写入
HKT<State<S, ?>, S> put(S s) {
    return new State<>(any -> 
        new State.StateData<>(any, s));
}

不过我看到 Haskell 的实现是这样的:

-- ie: (put 5) 1 -> ((),5)
put :: s -> State s ()
put x s = ((),x)

可以看到 haskell 的实现里在 put 的时候把 result 置空了,不知道哪种才是常规的实现。

static int fib(int n) {
    int[] a = {0, 1, 1};
    for (int i = 0; i < n; i++)
        a[(i + 2) % 3] = a[(i + 1) % 3] + 
                         a[i % 3];
    return a[(n + 1) % 3];
}

好像会算成 F(n+1) (

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.