Filter: Difference between revisions
Content deleted Content added
Add emacs lisp |
|||
Line 1,286: | Line 1,286: | ||
iex(12)> for x <- numbers, rem(x,2)==0, do: x # comprehension |
iex(12)> for x <- numbers, rem(x,2)==0, do: x # comprehension |
||
[2, 4, 6, 8]</syntaxhighlight> |
[2, 4, 6, 8]</syntaxhighlight> |
||
=={{header|Emacs Lisp}}== |
|||
{{trans|Common_Lisp}} |
|||
<syntaxhighlight lang="lisp"> |
|||
(seq-filter (lambda (x) (= (% x 2))) '(1 2 3 4 5 6 7 8 9 10)) |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
(2 4 6 8 10) |
|||
</pre> |
|||
=={{header|Erlang}}== |
=={{header|Erlang}}== |