User loginNavigation |
archivesseeking article on representing cyclic graphs using purely functional data structuresSome time ago I have seen an article reference on LtU that discussed representing cyclic graphs using purely functional data structures. The graph structure was something like flow graph or state machine. The article discussed switch from implementation based on mutable variables to purely functional version, and the thesis of article was that the authors lived more happily with purely functional version afterwards. I was unable to locate article using search (too many unrelated results), if somewhat remember the article or at least its title, please give me a reference. I'm from china and I'm working on a new programming language "Zero"First appologize for my poor English.:)So,I just write more codes. I'v found a new way of reusing codes: Question:
How to write a function return all these propX's value?
these three functions are very similar,can we write one function to deal with it? In my new programming language "Zero",it is OK!
So strange!Can it work?How to use it?Can the compiler of the language deal with it? Zero language has an IDE named "Amoeba".Through the syntax of the function analysis, Amoeba knows: so,when we write the function in IDE:
There is a blank we should fill.Amoeba's Code assist will give the message: It means there is only one selection we can fill.Why? Because m1 is integer type,and each side of ":=" has the same type,"Amoeba" knows it. if the code is like this:
Amoeba's Code assist will give the message: Why?because Amoeba don't know m1's type.So there are 3 selections. Now m1 has a "float" type! Let's explain the new way of reusing codes,the rule is: If we found similar codes,write it directly,if something is |
Browse archivesActive forum topics |
Recent comments
22 weeks 2 days ago
22 weeks 2 days ago
22 weeks 2 days ago
44 weeks 4 days ago
48 weeks 5 days ago
50 weeks 3 days ago
50 weeks 3 days ago
1 year 1 week ago
1 year 5 weeks ago
1 year 5 weeks ago