alga-tutorial's People
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. Ifa
is connected to 100 people, thenVertex 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 multipleVertex 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.