[release] merge previous version into master to avoid the increased version number

This commit is contained in:
Sławomir Śledź 2018-03-27 23:14:57 +02:00
commit 5979ac8548
3 changed files with 23 additions and 2 deletions

View file

@ -1 +1 @@
2.0 2.1

View file

@ -347,3 +347,4 @@ Adam,Monika,Slawek,Daniel,Bartek
# Resources # Resources
* [Inspiration](https://quasimal.com/posts/2012-05-21-funsh.html) * [Inspiration](https://quasimal.com/posts/2012-05-21-funsh.html)
* [Functional Programming in Bash](https://medium.com/@joydeepubuntu/functional-programming-in-bash-145b6db336b7)

View file

@ -193,6 +193,26 @@ filter() {
done done
} }
pass() {
echo > /dev/null
}
dropw() {
local x
while read x && $(echo "$x" | "$@"); do
pass
done
[[ ! -z $x ]] && { echo $x; cat -; }
}
peek() {
local x
while read x; do
([ $# -eq 0 ] && 1>&2 echo $x || 1>&2 "$@" < <(echo $x))
echo $x
done
}
stripl() { stripl() {
local arg=$1 local arg=$1
cat - | map lambda l . 'ret ${l##'$arg'}' cat - | map lambda l . 'ret ${l##'$arg'}'