- Reducer:
ratiofor the percentage of items that pass a predicate. - Reducer:
variance, the result of which can be applied tosqrtto find Standard Deviation. - Source:
chainto compose any number of Generators. - Source: The
generatortype and its functions have been exposed so that others can write their own Generators.
from-csvnow accounts for quotes, which ignore internal commas. Example:Foo,"10,000",Bar.
- Transducer:
sexpfor interpretting streams of chars or strings as separate SEXP strings. - Transducer:
safefor handling conditions within individual transducers. - Reducer:
quantitiesfor counting unique occurrences of streamed items. - Reducer:
partitionfor splitting the stream results. - Reducer:
base-stringfor reducing into asimple-base-string. - Reducer:
bit-vectorfor reducing into abit-vector. - Can now
transduceover abit-vector(e.g.#*0101). - Can now
transducespecially oversimple-stringandsimple-bit-vector, but only with certain compilers.
- Reducer:
vectorandaverageare now faster and use less memory. - Reducer:
stringis now more efficient and yields the specialized(simple-array character (*))type. compis now a macro and uses less memory for long composition chains.- All iterations are no longer implicitly wrapped in a
restart-case. Doing so improves performance (2x in the case of SBCL, 10x in the case of ECL, etc.) and drastically reduces memory usage. As mentioned above, if you know that specific transducers may fail, you can now wrap them insafe.
- A forgotten
all?export.
unique-byfor more control over how uniqueness is determined.foras a better pattern for doing something effectful over the stream.any?,all?, andreduced?as modern aliases.
for-each: useforinstead.
reducedas a better wrapper than calling the constructormake-reducedmanually.
- Purged usage of
uiopwhich was causing problems downstream. oncehandles anilargument better.- Apply
(optimize (speed 3))on all*-reducefunctions.
- lib: The
medianreducer. - lib: The
reversedsource to iterate from the end of a vector.
concatenateandflattennow support vectors/strings.- Dropped dependency on
fsetwithin the main lib. - Licenses further relaxed to MPL.
- lib: The
findreducer now accepts an optional:defaultvalue for when nothing could be found in the transduction that matched the predicate. - fset:
transduceimplementations forset,map,seq, andbag. - fset: Reducers for
set,map,seq, andbag.
- lib: Conditions signalled somewhere in the transduction chain can now be caught per-item, with various restarts available to rehandle or skip the problematic item.
- jzon: plists now
writeas JS objects.
allpandanypnow yieldtin the case of success, and not just "non-nil".
- New condition:
no-transduce-implementation
- If
transduceis called on a type which has nodefmethodfor it, a custom condition is thrown with a more helpful error message. - The JSON support system/package is now named
transducers/jzonto avoid compiler warnings.
Merry Christmas! I am jetlagged and writing this at 3:30 in the morning.
for-eachnow yieldstinstead ofnil, sincenilcan interact poorly with various control structures.
- An
unconstransducer for splitting up a stream of cons cells. - A
from-csvtransducer to interpret a string stream as CSV data, splitting the values into a hash table. - An
into-csvtransducer that, given someheaders, reverses the stream of hash tables back into strings of CSV. - A
snocreducer for reducing into a list without performing a final reverse. - A
hash-tablereducer for reducing into a Hash Table. Requires the transduction items to be cons cells, withcarbeing the key andcdrbeing the value. - A
plistsource for transducing over key-value pairs in a Property List. - New conditions:
empty-argumentempty-transduction(see below)imbalanced-plistnon-positive-integer
- The library is now distributed under the terms of the LGPL to promote wider use.
- Transducing over a
hash-tablenow yields the key-value pair as a cons cell, instead of just the value. The former behaviour is considered a bug. - The
seedargument of thefoldreducer is now&optional. When missing, the first value that makes it through the transduction will be used as the seed. If the transduction turns out to be empty, then the conditionempty-transductionwill be raised. - The
consreducer now usesnreverseinternally. You better not have been saving the intermediate results anywhere! segment,window, andstepnow offer restarts when a bad initial value is passed.- BREAKING:
average,first, andlastno longer accept a fallback value. Instead, a condition is raised when the transduction was empty. This means that calls that used to look like:
(t:transduce #'t:pass (t:average 'whatever) '(1 2 3 4 5))should now look like:
(t:transduce #'t:pass #'t:average '(1 2 3 4 5))Likewise for first and last.
- List transduction fixed on Clasp. Clasp doesn't (seem to) support tail-call
optimization, but it does support
labels-based TCO. This is also critical for thejzonsupport.
maxandminhave been deprecated in favour of callingfold. The seed value forfoldis optional now, so:
(t:transduce #'t:pass (t:fold #'max) '(1 2 3)) ;; => 3
(t:transduce #'t:pass (t:fold #'max 10) '(1 2 3)) ;; => 10
(t:transduce #'t:pass (t:fold #'max 10) '()) ;; => 10
(t:transduce #'t:pass (t:fold #'max) '()) ;; => Condition!- A
oncetransducer to inject a single value into any point in the transduction chain. - A
for-eachreducer to ignore all results and just consume the stream for its side effects.
allandanyshould now be called asallpandanyp. The old names have been marked deprecated and you will be warned at compile time.
Initial version.