# Questions tagged [sequences]

The tag has no usage guidance.

8 questions
Filter by
Sorted by
Tagged with
43 views

### Testing sequence for certain number of occurences of specific element

How can I test whether an array mfselc is composed of zeroes or all zeroes except for a single value being 1. Thus mfselc [0 0 1 0 0 0] is acceptable Also mfselc [0 0 0 0 0 0] is acceptable But mfselc ...
70 views

### Why do stream-cons and cons behave differently?

I am trying to create a lazy sequence of the lines in the current buffer using the stream.el library. These two recursive functions both read the lines of the current buffer from point to the end of ...
• 131
849 views

### mapcar but return non-nil element only

Is there a function that applies a transformation to a sequence and returns only the non-nil values? Right now I am using the following (as an example): (seq-filter #'identity (mapcar (lambda (x) ...
• 1,609
40 views

### Effective concatenation

How can I concatenate two sequences of lists (either lists of lists or vectors of lists) in constant time (independent of their size)?
• 175
1 vote
621 views

### Filter list by regexps

How can I get all elements of a list which don't match multiple patterns? The patterns are given as a list. For instance, I want all files without '("no" "nix") in them. (setq se-...
• 4,407
64 views

### Do we have anaphoric macros of seq.el?

In dash.el, there are anaphoric macros (it saves to write "lambda": (--map (* it 2) '(1 2)) instead of (-map (lambda (it) (* it 2)) '(1 2))) seq.el is more generic, it works on strings and vectors ...
• 1,091
129 views

### Rings and sequences

I find it surprising that rings (from make-ring) are sequences (satisfy sequencep), but cannot be operated on by standard sequence functions (length, elt, etc.). What, then, does being a "sequence" ...
• 3,868