Joe Armstrong真的是天才

这么简洁漂亮的语法都能创造出来,真的服了,着迷啊着迷!
[coolcode]
double([H|T]) -> [2*H|double(T)];
double([]) -> [].

> double([1,2,3,4]).
[2,4,6,8]

add_one([H|T]) -> [H+1|add_one(T)];
add_one([]) -> [].

map(F, [H|T]) -> [F(H)|map(F, T)];
map(F, []) -> [].

double(L) -> map(fun(X) -> 2*X end, L).
add_one(L) -> map(fun(X) -> 1 + X end, L).
[/coolcode]

Category: C / Erlang / Lua
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
9 Responses
  1. kevin says:

    沙发,很遗憾,我看不懂,哈哈!不过这老鸟的blog我会一直关注的。

  2. fanxiaowen says:

    一头雾水啊,啥语法

  3. emily says:

    天书???

  4. Jack says:

    Michael你好,很幸运能找到你的博客。

    我一直在学习做网站,之前重点在前台。现在我想学习更多后台的知识,例如服务器的配置,数据库的构造,软件的架构,以便搭建可以支持较高访问量的网站。

    希望你能推荐几本不错的书籍,可以获取这几方面的知识,谢谢!

  5. Michael says:

    [Comment ID #30032 Will Be Quoted Here]

    很高兴和你交流,一起提高。 你提到的这种综合性的书,不太好找,国外有本书叫 High proformance website ,感觉对部分细节和基础部分的东西讲得还凑合,但是还是不够全面,可以去书店先看看感受一下。

  6. Jack says:

    我找了一下High performance website,另外还找到一本High performance website design techniques, 描述建立1998年奥林匹克冬季运动会网站的后台技术。虽然现在很多东西还不懂,但我想从这个起点开始逐步摸索,慢慢会学到需要的知识。谢谢你的提示,Micheal。

  7. 发电机组 says:

    学习 学习

  8. heixiake says:

    这就是erlang语言吧,由于并发性支持特棒,和未来互联网的’云计算’相符合,有发展潜力,老大,最近在忙什么呢

  9. javalee says:

    就是erlang了,Joe Armstrong既然是瑞典皇家学院的博士,当然算得上天才了。

Leave a Reply

Your email address will not be published. Required fields are marked *

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image