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

Doc comments #11

Open
kyleect opened this issue Sep 9, 2023 · 0 comments
Open

Doc comments #11

kyleect opened this issue Sep 9, 2023 · 0 comments
Labels
🧩 CID Language enhancement New feature or request

Comments

@kyleect
Copy link
Owner

kyleect commented Sep 9, 2023

Syntax

;; Add two numbers together
;;
;; @type {procedure}
;; @param {number} a First number to add
;; @param {number} b Second number to add
;; @returns {number} Result of adding numbers
(define add (lambda (a b) (+ a b)))

or

(define add
  ;; Add two numbers together
  ;;
  ;; @type {procedure}
  ;; @param {number} a First number to add
  ;; @param {number} b Second number to add
  ;; @returns {number} Result of adding numbers
  (lambda (a b) (+ a b)))

or

(define add
  "
  Add two numbers together
  
  @type {procedure}
  @param {number} a First number to add
  @param {number} b Second number to add
  @returns {number} Result of adding numbers
  "
  (lambda (a b) (+ a b)))

Questions

  • First class doc comments? (doc sum) ==> "Add two numbers...
@kyleect kyleect added enhancement New feature or request 🧩 CID Language labels Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧩 CID Language enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant