What about Function.identity/0, that returns an anonymous identify function?
def identity(), do: &(&1) So usage would look like: Enum.map(list, Function.identity()) That (to me) works just as well as Function.identity/1, and keeps with the convention of functions in the Function module returning functions. It is an additional layer of indirection, but I honestly don’t think this is going to be a feature that’s used by anyone other than advanced users. It might be confusing to those new to FP, but those folks won’t even think to use this feature, at least not by name. -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/ff409509-d00f-4b09-b03f-c2f16217c091%40googlegroups.com.
