-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
This package has utilities like collectresidues and collectatoms. Because this allocates storage, it might be of interest to implement an alternative. I see two main options:
- an iterator interface, e.g.,
EachResidue(struc)orEachAtom(struc).collectresiduescould then be implemented ascollectresidues(struc) = collect(EachResidue(struc))but one could also perform other forms of processing (for r in EachResidue(struc) ... end). - a transducers interface, where
foldxlis the core operation.
I have less personal experience with the latter, so left to my own devices I'd probably be tempted to implement the iterator version. But collectresidues/collectatoms are currently probably special cases of foldxl so generalizing them would be perfectly viable too.
Metadata
Metadata
Assignees
Labels
No labels