Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions - Common Monadic Forms #18

Open
jnguyen095 opened this issue Jul 5, 2017 · 0 comments
Open

Functions - Common Monadic Forms #18

jnguyen095 opened this issue Jul 5, 2017 · 0 comments

Comments

@jnguyen095
Copy link
Owner

Try to avoid any monadic functions that don’t follow these forms

For example,

void includeSetupPageInto(StringBuffer pageText). 

Using an output argument instead of a return value for a transformation is confusing. If a function is going to transform its input argument, the transformation should appear as the return value. Indeed,

StringBuffer transform(StringBuffer in) 

is better than void transform-(StringBuffer out), even if the implementation in the first case simply returns the input argument. At least it still follows the form of a transformation.

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

No branches or pull requests

1 participant