See the documentation: grep and map. Briefly (not not entirely accurately):
grep expression list runs across a list and returns a list containing the elements of the original list for which the expression is true.
map expression list runs across a list and returns a list containing the value of expression for each of the elements of the original list.
In reply to Re: difference between grep and map
by GrandFather
in thread difference between grep and map
by boom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |