help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?


From: WJ
Subject: Re: Why aren't `find`, `find-if`, `remove-if` part of Emacs Lisp?
Date: Fri, 20 Jun 2014 00:20:46 +0000 (UTC)
User-agent: XanaNews/1.18.1.6

Stefan Monnier wrote:

> Most languages I know provide list operations
> via libraries.

I hope that you are kidding.  If you're not, I hope that you have
nothing to do with the "development" (or hobbling) of Emacs Lisp.

Most languages that I know provide list operations without
loading a library.  There would be no reason not to.  List
operations are fundamental.

One should not have to load a package that emulates CL in order
to have the usual and expected list operations, and one should not
have to load a third-party library like Dash.

Racket:

 > (filter odd? '(0 1 2 3))
 '(1 3)

Bigloo Scheme:

1:=> (filter odd? '(0 1 2 3))
(1 3)

Clojure:

user=> (filter odd? [0 1 2 3])
(1 3)

Arc:

arc> (keep odd '(0 1 2 3))
(1 3)

NewLisp:

 > (filter odd? '(0 1 2 3))
 (1 3)

Julia:

julia> filter( isodd, [0 1 2 3] )
2-element Int32 Array:
 1
 3

Ruby:

[0,1,2,3].select( &:odd? )
    ==>[1, 3]

OCaml:

# List.filter (fun x -> x > 0) [0;1;2;3] ;;
- : int list = [1; 2; 3]

elisp:

: (mapcar #'1+ '(0 1 2 3))
(1 2 3 4)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]