Jump to content

Filter: Difference between revisions

Add emacs lisp
(Add emacs lisp)
Line 1,286:
iex(12)> for x <- numbers, rem(x,2)==0, do: x # comprehension
[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}}==
59

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.