Skip to content

biojulep: iterators or fold for structures #57

@timholy

Description

@timholy

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) or EachAtom(struc). collectresidues could then be implemented as collectresidues(struc) = collect(EachResidue(struc)) but one could also perform other forms of processing (for r in EachResidue(struc) ... end).
  • a transducers interface, where foldxl is 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions