|
发表于 2015-4-7 22:18:23
|
显示全部楼层
你参考下foreach就知道了。
Advanced Usage
The foreach function typically expands to call mapc; however, you can also request that a specific mapping function be applied by giving the name of the mapping function as the first argument to foreach. Thus, foreach can be used as an extremely powerful tool to construct new lists.
Note: Mapping functions are not accepted when this form is applied to association tables.
foreach( mapcar x '(1 2 3) (x >1))=> (nil t t)
foreach( mapcan x '(1 2 3) if((x > 1) ncons(x))) => (2 3)
foreach( maplist x '(1 2 3) length(x)) => (3 2 1) |
|