You are looking at historical revision 28275 of this page. It may differ significantly from its current revision.

## srfi-4-comprehensions

SRFI-42 Comprehensions for SRFI-4 Vectors

The `srfi-4-comprehensions` extension defines comprehensions and generators (in the sense of SRFI-42) for the homogeneous numeric vectors of SRFI-4.

The syntax of these generators and comprehensions follows exactly the syntax of the `vector-ec`, `vector-of-length-ec`, and `:vector` comprehensions and generator. Include in your module using

(require-extension srfi-42 srfi-4-comprehensions)

The following comprehensions are provided:

(s8vector-ec <qualifier>* <expression>) (u8vector-ec <qualifier>* <expression>) (s16vector-ec <qualifier>* <expression>) (u16vector-ec <qualifier>* <expression>) (s32vector-ec <qualifier>* <expression>) (u32vector-ec <qualifier>* <expression>) (s64vector-ec <qualifier>* <expression>) (u64vector-ec <qualifier>* <expression>) (f64vector-ec <qualifier>* <expression>) (f32vector-ec <qualifier>* <expression>)

(s8vector-of-length-ec <k> <qualifier>* <expression>) (u8vector-of-length-ec <k> <qualifier>* <expression>) (s16vector-of-length-ec <k> <qualifier>* <expression>) (u16vector-of-length-ec <k> <qualifier>* <expression>) (s32vector-of-length-ec <k> <qualifier>* <expression>) (u32vector-of-length-ec <k> <qualifier>* <expression>) (s64vector-of-length-ec <k> <qualifier>* <expression>) (u64vector-of-length-ec <k> <qualifier>* <expression>) (f64vector-of-length-ec <k> <qualifier>* <expression>) (f32vector-of-length-ec <k> <qualifier>* <expression>)

And the following generators are provided:

(:s8vector <vars> <arg1> <arg>*) (:u8vector <vars> <arg1> <arg>*) (:s16vector <vars> <arg1> <arg>*) (:u16vector <vars> <arg1> <arg>*) (:s32vector <vars> <arg1> <arg>*) (:u32vector <vars> <arg1> <arg>*) (:s64vector <vars> <arg1> <arg>*) (:u64vector <vars> <arg1> <arg>*) (:f64vector <vars> <arg1> <arg>*) (:f32vector <vars> <arg1> <arg>*)

## License

Derived (almost verbatim) from the code for vector comprehensions in the SRFI-42 reference implementation. The copyright on that code is:

Copyright (C) Sebastian Egner (2003). All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Modifications are copyright (C) Will M. Farr (2006), goverened by the same conditions.

## History

- 1.4
- uses fixnum ops where appropriate; repaired use of psyntax-specific ellipsis marker
- 1.3
- cleaned up installation script
- 1.2
- ported to chicken 4
- 1.0
- initial version