I want to use some function such as "zip", "fold" and "map" in perl. (Just like in Haskell.) I found map and it works well. Then, is there zip and fold? Thank you very much.
The List::Util
library includes reduce()
, which does essentially what fold
does.
List::MoreUtils
contains a zip()
function.
Neither is built-in, mostly because Perl is not a functional programming language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With