摘要: Ruby 2.0有一个新的特性是惰性枚举器,[Soi Mort 的博客][1]举了一个例子:可以将下面的代码 File.open(path) {|fp| fp.each_line. \ select {|line| # 生成了临时数组 /regexp/... 阅读全文
posted @ 2015-05-19 00:19 Johnwii 阅读(402) 评论(0) 推荐(0) 编辑
摘要: ##Struct的默认构造函数## struct Complex { public Int32 Re { get; set; } public Int32 Im { get; set; } public Complex() { Re = 0... 阅读全文
posted @ 2015-05-19 00:18 Johnwii 阅读(360) 评论(0) 推荐(0) 编辑