#22 Export COLLECT-IGNORE functionality

closed-fixed
nobody
None
5
2008-10-27
2008-10-14
No

At the moment, ITERATE can be used to iterate a series for side effect. However, compare:

(iterate ((num (scan-range :below 10)))
(print num))

with

(collect-ignore (#Mprint (scan-range :below 10)))
[or even (collect-ignore (print (scan-range :below 10))) with implicit mapping]

I find the second form shorter and nicer, because the temporary NUM does not have to be named. Except that COLLECT-IGNORE is not exported from the series package.

I would propose to export COLLECT-IGNORE, or perhaps even better, to make (COLLECT NIL ...) work in the same way was COLLECT-IGNORE [similar to (MAP NIL ...)].

Discussion

  • Raymond Toy

    Raymond Toy - 2008-10-27
    • status: open --> closed-fixed
     
  • Raymond Toy

    Raymond Toy - 2008-10-27

    I will export collect-ignore.

    COLLECT NIL is an interesting idea. I have it working now, but it has other implications to other functions taking a type argument.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks