Elrec
ELREC: Elixir List Recursion & Enum Converter
This module provides functions to convert between recursive and Enum-based list processing, and compare their differences and performance.
Installation
If available in Hex, the package can be installed
by adding elrec to your list of dependencies in mix.exs:
def deps do
[
{:elrec, "~> 0.1.0"}
]
endAnd run:
$ mix deps.getUsage
$ mix elrec [options] <.exs file>Options
-h,--help: Show this help messagev,--version: Show version-m,--mode: Specify conversion mode (required)to_enum: Convert recursion to Enum functionsto_rec: Convert Enum functions to recursion
-d,--diff: Show differences instead of converted code-b,--benchmark: Run benchmarks on before/after code
Usage Examples
$ mix elrec --mode to_enum sample.exs
$ mix elrec -m to_rec -d -b sample.exsDocumentation
Documentation is available on Hexdocs
Copyright and License
Copyright (c) 2025 Shu Matsuo (@choualacreme)
ELREC is released under the MIT License, see LICENSE.md file for more details.