question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] Implement Except Set Operation

See original GitHub issue

A first-time contributor here! I would love to open up a pull request and implement some stuff! Looks like the except function might be the lowest hanging fruit, so I’d love to take a stab at it.

On the lodash documentation page, the without function uses a signature like this:

const items = _.without(array, ...items);

How about something like this?

const squares = from([1, 2, 3])
  .except(2) // or maybe name it `without` instead?
  .map(e => e * e)
  .toArray();

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
leeoniyacommented, Mar 22, 2019

probably would be more flexible as a function, and more uniform with the rest of the lib.

.not(e => e == 2)

EDIT: eh, i guess my version is just the inverse of filter. i’d still prefer to keep the minimal api:

.filter(e => e !== 2)

/$0.02

0reactions
tomicommented, Apr 2, 2019

Available in 1.2.0 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

HEMS variable definitions RFC 1024 - IETF Datatracker
Note: If the SET operator is defined then use of some form of access control is recommended. Operations on Object: The defaults except...
Read more >
RFC 205: NETCRT - a character display protocol
The cursor register is not assumed to operate modulo M x Nxsy. It is possible for a server command to set the cursor...
Read more >
SNMPv2-TC.mib: RFC 2579</a> - ITU
Whereas five of the six values (all except `notReady') may be specified in a management protocol set operation, only three values will be...
Read more >
HTTP/1.1: Status Code Definitions
If a clockless origin server obeys these rules, and proxies and clients add their own Date to any response received without one (as...
Read more >
Partial document update in Azure Cosmos DB | Microsoft Learn
Set operation is similar to Add for all data types except Array . An Add operation at any (valid) index, results in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found