Reputation: 27548
I know there is a list-comprehension library for common lisp (incf-cl), I know they're supported natively in various other functional (and some non-functional) languages (F#, Erlang, Haskell and C#) - is there a list comprehension library for Scheme?
incf-cl is implemented in CL as a library using macros - shouldn't it be possible to use the same techniques to create one for Scheme?
Upvotes: 10
Views: 1803
Reputation: 117280
You can use LINQ for R6RS Scheme (although it could be made to run under 'older' implementations).
Upvotes: 0
Reputation: 18389
I don't know which Scheme you use. PLT Scheme bundles Swindle and SRFI-42. Both are supposed to be cross-Scheme compatible, though.
If you use PLT Scheme, here is SRFI-42's man page. You say (require srfi/42)
to get it.
Upvotes: 8