-
partitionRanges.kt:
partition()
implements a function for fixed and sliding windows suited for lists (not sequences) using indices/ranges. -
partitionRecursion.kt:
partitionRec()
andpartitionTailrec()
implement such functions suited for lists using recursion and tail recursion (very inefficient). The concatenation of a lot of sequences using.plus()
(or.flatten()
) results in aStackOverflowException
. -
partitionIterator.kt:
batch()
andslide()
implement such functions suited for lists and sequences (similar to the prototype implementation). Small "problem" here is thatsource.iterator()
introduces mutual state. Does not use RingBuffer or LinkedList, instead replaces the whole List. -
partitionZipDrop.kt: A sliding window for pairs with an offset of one, can be implemented ad hoc with this simple variant which uses
zip()
. This however does not work withsequenceOf(...).constrainOnce()
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
for commit in $(git --no-pager log --reverse --after="2016-10-01T10:36:00-07:00" --pretty=format:%H) | |
do | |
echo $commit | |
git checkout $commit | |
#write linguist data to a file | |
echo "" >> ~/repo-linguist-report.txt | |
echo "commit: $commit" >> ~/repo-linguist-report.txt |