Skip to content

Thread on single line with single-argument functions #206

Open
@MicahElliott

Description

@MicahElliott

When threading a few calls single-argument calls that will fit within 80 characters, prefer a single line.

;; good
(-> x fizz :foo first frob)

;; not as good
(-> x
    fizz
    :foo
    first
    frob)

But when one of more functions takes arguments, split each call onto a separate line.

;; good
(-> x
    (fizz a b)
    :foo
    first
    (frob x y))

;; not as good
(-> x (fizz a b) :foo first (frob x y))

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