# `LexCredo.Check.Refactor.NoEnumWrapperFunctions`
[🔗](https://github.com/sippy-platform/lex_credo/blob/main/lib/lex_credo/check/refactor/no_enum_wrapper_functions.ex#L1)

## Basics

> #### This check is disabled by default. {: .neutral}
>
> [Learn how to enable it](`e:credo:config_file.html#checks`) via `.credo.exs`.

This check has a base priority of `normal` and works with any version of Elixir.

## Explanation

Avoid writing named functions whose body is only a call to `Enum.*` or
`Stream.*`.

Such wrappers hide the collection structure, coupling the function to one
call-site shape and preventing reuse in `Stream`, `Task.async_stream`, or
comprehensions. Instead, write a function that operates on a single item
and compose it with `Enum`/`Stream` at the call site.

    # BAD — parse_items/1 is only usable with a list
    def parse_items(list), do: Enum.map(list, &String.to_integer/1)

    # GOOD — parse_item/1 is reusable anywhere; caller composes with Enum
    defp parse_item(item), do: String.to_integer(item)
    collection |> Enum.map(&parse_item/1)

## Check-Specific Parameters

Use the following parameters to configure this check:

### `:exclude_test_files`

  When `true`, skips test files. Default: `false`.

*This parameter defaults to* `false`.

## General Parameters

Like with all checks, [general params](`e:credo:check_params.html`) can be applied.

Parameters can be configured via the [`.credo.exs` config file](`e:credo:config_file.html`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
