Releases: RougeWare/Swift-Function-Tools
Releases · RougeWare/Swift-Function-Tools
1.2 - `constant`, another `echo`, and `!`
This release brings three new function generators:
echo(_:)
- A newecho
function which creates and returns a function which only ever returns the value you gave theecho
functionconstant(_:)
- Two functions which always return the same value: one just like the aboveecho
function (purely alias for clarity), and one which creates a non-transformer which ignores its input always returns the same value!
- Creates a function which simply inverts the output of the function after the exclamation point
See the Readme for examples!
Patch Changes
- 1.2.4
- #13: Made the
curry
functionpublic
- #13: Made the
- 1.2.3
- Added a dynamic library product whose name is a valid bundle identifier
- Deprecated previous dynamic library product because its name caused problems when submitting to the App Store
- 1.2.2
- Added alternative dynamic library product
- 1.2.1
- Added dual licenses
1.1.0 - Added `echo` functions
Like it says on the tin, these just echo what they're given.
The first version simply returns the value it's given. This is useful for reusing the input of higher-order functions:
let withoutNils = arrayOfOptionals.compactMap(echo)
The second version is useful for flattening collections of generators:
let values = generators.map(echo)
1.0.0 - MVP
Just a few things that I've written and re-written over and over again over several projects, just to make functions a little nicer 🙂