#1 : Shorthand notations for lambdas
This commit is contained in:
parent
adfe8ec68b
commit
c1ae19f270
2 changed files with 21 additions and 4 deletions
|
@ -30,4 +30,9 @@ testFlatMap() {
|
|||
assertEquals "d e h l l l o o r w" "$(list hello world | map lambda x . 'command fold -w 1 <<< $x' | sort | unlist)"
|
||||
}
|
||||
|
||||
testMapNoLambdaSyntax() {
|
||||
assertEquals "1 2 3" "$(list 1 2 3 | map echo | unlist)"
|
||||
assertEquals "1 is a number 2 is a number 3 is a number" "$(list 1 2 3 | map 'echo $ is a number' | unlist)"
|
||||
}
|
||||
|
||||
. ./shunit2-init.sh
|
Loading…
Add table
Add a link
Reference in a new issue