Skip to content

Ozymandias42/Functional-Bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Functional Bash

This is a collection of Bash functions to make bash more functional.

API

filter

description

Usage: filter funcName "${arrName[@]}"

map

description

Usage: map funcName "${arrName[@]}"

refmap

description

Usage: refmap callback arr[@] => []

chain

description

Usage: chain funcs[@] arr[@]

reffoldr

Referential foldr.

Usage: foldr callback [$init] arr[@]

unfold

description

Usage: unfold callback [$init] $limit [$step] => []

zip

description

Usage: zip arr1[@] arr2[@] [tuplesep]

zipWith

description

Usage: zipWith funcname arr1[@] arr2[@] [tuplesep]

forEach

description

Usage: ...

forEachParallel

Special forEachParallel. Uses the coproc directive in bash to run each function call asynchronously.

Contributions

This code is licensed under the MIT license. Contributions are welcome.

About

A small collection of FP functions for use in bash

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages