From f031d22b1322a9f26eea9b0a20e0ff6cac08e28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=9Aled=C5=BA?= Date: Sun, 11 Mar 2018 00:55:52 +0100 Subject: [PATCH 1/4] [release] prepare for next development iteration --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index cd5ac03..ceb0059 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.0 +2.1-SNAPSHOT From ffff49bd0e7d2e26ee962e43a3c3966ca8dc6851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=9Aled=C5=BA?= Date: Sun, 11 Mar 2018 01:05:59 +0100 Subject: [PATCH 2/4] Documentation --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1c426c..03d5783 100644 --- a/README.md +++ b/README.md @@ -346,4 +346,5 @@ Adam,Monika,Slawek,Daniel,Bartek # Resources -* [Inspiration](https://quasimal.com/posts/2012-05-21-funsh.html) \ No newline at end of file +* [Inspiration](https://quasimal.com/posts/2012-05-21-funsh.html) +* [Functional Programming in Bash](https://medium.com/@joydeepubuntu/functional-programming-in-bash-145b6db336b7) \ No newline at end of file From 03418caa85c2c56c0750e5d097f39be241faf5dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=9Aled=C5=BA?= Date: Sun, 18 Mar 2018 12:01:29 +0100 Subject: [PATCH 3/4] Three new functions: pass, dropw, peek --- src/fun.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/fun.sh b/src/fun.sh index 9608852..d0b3af8 100755 --- a/src/fun.sh +++ b/src/fun.sh @@ -193,6 +193,26 @@ filter() { 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() { local arg=$1 cat - | map lambda l . 'ret ${l##'$arg'}' From 22c81bd09ae3827ee03f189f241de48017b72830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20=C5=9Aled=C5=BA?= Date: Tue, 27 Mar 2018 23:14:57 +0200 Subject: [PATCH 4/4] [release] prepare release v2.1 --- .version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.version b/.version index ceb0059..879b416 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -2.1-SNAPSHOT +2.1