- 博客(4)
- 收藏
- 关注
转载 Effective Erlang —— 二进制型的构造和匹配
在 R12B 中,构造和匹配二进制型最自然的方式比前版中的要快得多。你可用如下简单的代码来构造一个二进制型:这么写(在 R12B 中)/求别这么写(在 R12B 之前的版本中)my_list_to_binary(List) -> my_list_to_binary(List, <<>>).my_list_to_binary([H|T], Ac...
2015-08-18 13:55:00 96
转载 七周七语言 Ruby 第一次作业
1 puts "hello world" 2 3 "Hello, Ruby.".index("Ruby.") 4 5 x = 0 6 puts "bigwhite" while (x = x + 1) < 11 7 8 x = 0 9 puts "This is sentence #{x = x + 1}" while x < 10...
2015-03-14 23:14:00 97
转载 [leetcode] 01 Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, ...
2015-01-26 23:39:00 69
转载 Erlang 中处理 register 重复注册
-module(demo).-compile(export_all).foo() -> receive after 100000 -> io:format("ok~n") end.main() -> register(name1, spawn(fun() -> foo() e...
2015-01-23 22:26:00 166
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人