Skip to content

Add examples how to break long function headers #13

Description

@hvr

How shall a function with long list of arguments be broken?

What of the following is acceptable (n.b. the max line length was shortened artificially for illustration)? where shall the =-sign land?

longfunname arg1 arg2 arg3 arg4 arg5 arg5
    = long body ...

longfunname arg1 arg2 arg3 arg4 arg5 arg5 =
    long body ...

longfunname arg1 arg2 arg3 arg4 arg5 arg5
    (Cons1 arg6 arg7 arg8 arg9)  
    = long body ...

-- note the weird ()-brackets
longfunname arg1
    arg2 arg3 arg4
    arg5 arg5 (Cons1
    arg6 arg7arg8
    arg9)
    = long body ...


-- ... ?

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