Added map-like and filter-like to sets.#1217
Conversation
|
Thanks! These look like they'd work, but we have a few comments:
|
|
Mmph. Okay, fine. I'll yield on the -like parts.
|
|
Thanks for the feedback! I'll try to implement the changes you suggested. A quick question, with regard to point 2, were you saying that for list-sets If you're referring to Thanks, -Ethan |
|
Hmm. If we want to be efficient, for
For We would then have: There are (Even though we use |
|
That makes a lot of sense. I guess I just didn't think about the speed of a filter implemented by fold vs the JS version. Thanks for the help! |
|
Also if the JS implementations provided a significant speed up, I assume the original implementation of would be faster than: |
|
The reason why my suggestion for The issue with is that it allocates would allocate at most only That said, I didn't mean to say which one is better, as I don't know if it's worth getting rid of intermediate structures or not, compared to using raw JS functions. Probably worth asking @jpolitz. |
|
@ess476 I'm assuming this is no longer on your radar? |
|
@jpolitz this never got added, but it also doesn't seem like anyone has needed it enough to light a fire under this PR. ok to close? |
|
Actually, I don't think we should close this, I'd rather we add something like this. Perhaps this is better done atop the |
|
ACK. Is this important enough to put on Dorai's list after the new test harness and before Treecer? |
|
Since I think this is a relatively small thing, yes. Also, with the CnD integration proving useful, there may be a better "Treecer" project on hand. The main thing here is to think about the design of this interface, perhaps associating it with the |
This adds the features requested in #1179. It also fixes a spelling mistake in the in the sets testing code.