Category:AntLang: Difference between revisions

Content added Content deleted
No edit summary
No edit summary
Line 3: Line 3:
AntLang is a practical functional language.
AntLang is a practical functional language.


For example check this fibonacci implementation:
For example check out this simple web-server:
<lang AntLang>fib:{foldl[{x concat seq[(-1 elem x) + -2 elem x]}; 0 seq 1; range[x]]}</lang>
<lang AntLang>serv: httprun[8080; {"HTTP/1.0 OK 200\r\n\r\nDirectory: " concat elem["PATH"; x]}]</lang>

AntLang has many unconventional features like first class operators, since operator = function with arity 2:
<lang AntLang>op:{elem[x; seq[+; -; *]]}
2 op[0] 2</lang>


Check out [http://ac1235.github.io/ the website], if you are interested.
Check out [http://ac1235.github.io/ the website], if you are interested.