GithubHelp home page GithubHelp logo

alga-tutorial's People

Contributors

nobrakal avatar

Stargazers

 avatar

Watchers

 avatar  avatar

alga-tutorial's Issues

Spelling / grammar errors.

I just notice a few errors / things that feel off as a Native speaker, I'm not an expert in English tho so I can't name all the issues.

when trying to use it in a functional languages such as Haskell.

Mix of the singular a, and plural languages.

The idea of alga is to use an other definition of graph

I believe we usually write this as another, though I do wonder if that's technically correct English.

You have an only way to construct the empty graph

This feels clunky.

which does not take any argument.

Can't tell if this is clunky or violating rules of plurals, I would say "any arguments", or " an argument".

Probably a bunch more, I just leave this here as a note that a native speaker might want to proof read it, or perhaps your English has improve since writing it.

Thanks for the tutorial though!

Beautiful tutorial. One small error.

Space is important

Your company is looking to have many users, so maybe the ConnectU is not very wise. In fact, adding a (Connect (Vertex a) (Vertex b)) is not very alga-friendly. If a is connected to 100 people, then Vertex a will be 100 times in the representation!
On the advice of your superior, you can change it to:

handleRequestM (ConnectU a b) =
  (>>=) (\x -> if x == a
    then Connect (Vertex x) (Vertex b)
    else Vertex x )

The modified function will take longer to add a connection (foldg has a complexity of O(n)), but you will ensure that your graph will not grow too fast (if and only if there is not multiple Vertex a hidden in the representation).

(>>=) should be (=<<), and the algorithm itself doesn't work on a graph like Connect 1 2.

[1 of 1] Compiling Alga             ( /home/jt2/repos/Haskell-Practice/algebraic-graphs-experiment/src/Alga.hs, interpreted )
Ok, one module loaded.
*Alga> main
digraph 
{
  "1"
  "2"
  "3"
  "1" -> "2"
  "1" -> "3"
}
*Alga> main2
digraph 
{
  "1"
  "2"
  "3"
  "1" -> "2"
  "1" -> "3"
  "3" -> "2"
}

https://github.com/2jacobtan/Haskell-Practice/blob/master/algebraic-graphs-experiment/src/Alga.hs


The tutorial was really nice actually. Thanks!!

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.