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

Should it be standard for stub files to come with argument lists and doc strings (as appropriate)? #234

Closed
CrowsVeldt opened this issue Jun 9, 2018 · 0 comments

Comments

@CrowsVeldt
Copy link
Contributor

re: PR #233 and Issues #205 & #229 (which I opened myself)

I think it would be nice to have all stub files be formatted like beer-song, and run-length-encoding. With each function having an appropriate arguments list and doc string. I think this would provide a good stating point for the less experienced of us.

I'm still don't know how to document non-function defs like triangle in pascals-triangle and proverb. I'd be happy to hear what more experienced Clojurists can suggest

What do you think? I'll be happy to work on it myself if people agree.

examples

beer-song.clj:

(ns beer-song)

(defn verse
 "Returns the nth verse of the song."
 [n])

(defn sing
  "Given a start and an optional end, returns all verses in this interval. If
  end is not given, the whole song from start is sung."
  ([start])
([start end]))

proverb.clj:


(ns proverb)

(def proverb "")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants