Skip to content

Prefer returning output rather than printing #4

Description

@dpsanders

Comment from #3 so it doesn't get lost:

As a general rule I would suggest to return e.g. a vector of iterates, rather than printing them out inside a function.

When you call the function and return that vector, Julia will automatically output it, including the length of the resulting vector. This then allows you to save the results for later plotting etc.

This is a message that is very important to drill home at the earliest opportunity.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions