不使用reverse操作翻转一个序列
Write a function which reverses a sequence.
(= (__ [1 2 3 4 5]) [5 4 3 2 1])
(= (__ (sorted-set 5 7 2 7)) '(7 5 2))
(= (__ [[1 2][3 4][5 6]]) [[5 6][3 4][1 2]])
一个巧妙的答案:
#(reduce conj () %)
Copyright © 2012-2014 我的代码板 Inc. 保留所有权利。
页面耗时0.0279秒, 内存占用1.83 MB, 访问数据库13次
闽ICP备15009223号-1