I assume you mean the default function should be

'''
fn x -> !x end
'''

To reject any falsey value. It does seem reasonable, but I dont think it is 
nearly as readable as 'compact', so I vote nay to this one...

In fact, isn't this a better option? (Or equally good)

'''
def filter(enum, fun \\ fn x -> x end)
'''

Actually I have also thought that a 'unity' or 'itself' function should be part 
of stdlib, to make this possible as:

'''
list
|> Enum.filter(&itself)
'''

-- 
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 elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/06bc7738-3ed9-4a21-9fce-b7eb3fecd600%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to