输出重复的序列
Write a function which duplicates each element of a sequence.
(= (__ [1 2 3]) '(1 1 2 2 3 3))
(= (__ [:a :a :b :b]) '(:a :a :a :a :b :b :b :b))
(= (__ [[1 2] [3 4]]) '([1 2] [1 2] [3 4] [3 4]))
网上找到了个函数
#(interleave % %)
暂时还不完全理解interleave的用法
Copyright © 2012-2014 我的代码板 Inc. 保留所有权利。
页面耗时0.0270秒, 内存占用1.83 MB, 访问数据库13次
闽ICP备15009223号-1