创建list方法总结

构建一个list

注意要标记不要求值,比如用‘ 或者list

> (list "a" "b" "c")
("a" "b" "c")

或者

> '("a" "b" "c")
("a" "b" "c")


设置一个空list

(set 'my-list '())


用函数参数构建一个list

(define-macro (location-file-based-on-modified-time dir-path from-seconds to-seconds)
  (println (list from-seconds to-seconds))
调用代码如下:

(FILE:location-file-based-on-modified-time "/home/dean/Videos/" 1409496931 1409496931)
结果:

(1409496931 1409496931)




你可能感兴趣的:(创建list方法总结)