Skip to content

Instantly share code, notes, and snippets.

View CYanLong's full-sized avatar

陈艳龙 CYanLong

  • Harbin, China
View GitHub Profile
@CYanLong
CYanLong / arrayAndList.java
Last active November 8, 2016 04:16
Conversion of arrays and collections
/* array 转 list
Arrays.asList(T... elem) 返回的是Arrays内部自己实现的List.
*/
public void arrayToList(){
int[] array = new int[10];
List<Integer> lists = new ArrayList<Integer>(Arrays.asList(array));
}
/*Integer array to int array
不会自动装箱,也 无法强转.
@CYanLong
CYanLong / list-operation.ss
Last active November 2, 2016 10:49
Scheme List Operation
;Scheme中关于list的操作.
; author: cyanlong
; date: 2016-11-02
;一:构造list
;通过Scheme提供的序对操作.
;cons :construct
(cons 1
(cons 2
(cons 3 nil)))