Giter Site home page Giter Site logo

fregegoodness's People

Contributors

dfuenzalida avatar dierk avatar ingo60 avatar y-taka-23 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

fregegoodness's Issues

Explain FregeFX

we may want to wait for the finalization of the native API but we may also just go ahead with what we have

Is "More Advanced Polymorphism" Ready?

I found that we have one more chapter titled "More Advanced Polymorphism" (the filename is higher-kinded.adoc,) nevertheless it have not linked from anywhere. Do you have a plan for publication of this contents?

Wrong function composition in "Designing with functions and composition"

The chapter contains two function compositions, which use the static function, that is also declared in this chapter.

The static function: static :: Board -> Double

The two usages:
valueTree = static . prunedTree
maxValue = maximize . static . prune 5 . gameTree

The usages are wrong, since static requires a Board (not a Tree of Board) and it returns a Double when maximize requires also a Tree.

The composition is correct in the linked example from the book (example):

evaluateBy :: Ord a => (Board -> a) -> Int -> Board -> a
evaluateBy f lookahead = minimize . fmap f . prune lookahead . gameTree

nowValue :: Int -> Board -> (Double, Board)
nowValue lookahead board = (evaluateBy static lookahead board, board)

Here static is used with fmap, which applies it on the values in the Tree of Board.

So the fixed chapter would contain:
valueTree = fmap static . prunedTree
maxValue = maximize . fmap static . prune 5 . gameTree
but probably also needs some explanation on fmap, when putting it there.

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.