Sheffield-iGEM / syn-zeug

A modern toolbox for synthetic biology
https://sheffield-igem.github.io/syn-zeug/
GNU Affero General Public License v3.0
6 stars 3 forks source link

Improve `ByteMap::to_hashmap()` to Take `impl Fn(usize, T) -> bool` #20

Closed TheLostLambda closed 2 years ago

TheLostLambda commented 2 years ago

This would allow the caller to also filter the resultant map by index / key – allowing for the eventual implementation of Seq::percent_composition(kind: SeqKind), where the resultant composition map contains only (and all) of the elements of a given alphabet.

TheLostLambda commented 2 years ago

Note that, with kind and alphabet now as fields of Seq, Seq::percent_composition() should only need to take &self and shouldn't bother with a kind: ... argument like I mentioned in this issue originally