Skip to content

Make Functions Pure #3

@siwells

Description

@siwells

SADFace will be a better library if, instead of maintaining a single internal SADFace document, every function was pure and operated on the document passed into it.

This should mostly be busy work of the following sort:

  1. Supply document to function through argument list (first argument?).
  2. Where possible, manipulate the document as necessary for the purposes of the function in a side-effect free way.
  3. Return the output. This is generally either (a) the modified document or (b) a subset of the document (perhaps modified), (c) something derived from the document.
  4. Update unittests (where necessary).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions