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

Add section on Debugging a script in the docs? #41

Open
Metaxal opened this issue Jul 29, 2020 · 1 comment
Open

Add section on Debugging a script in the docs? #41

Metaxal opened this issue Jul 29, 2020 · 1 comment

Comments

@Metaxal
Copy link
Owner

Metaxal commented Jul 29, 2020

Say that the script's file really is a module, so the script's function can be run in DrRacket's interaction window, and called with 'mock' arguments, and give an example

@Metaxal
Copy link
Owner Author

Metaxal commented Jul 29, 2020

adapted from @spdegabrielle :

#lang racket/base
(require quickscript)
(define-script reverse-selection
  #:label "Reverse"
  #:help-string "reverses the selection"
  (λ (selection)
    (list->string (reverse (string->list selection)))))

(module+ test
  (require rackunit)
  (check-equal? "Welcome Sharon!" (reverse-selection "!norahS emocleW")))

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

1 participant