You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(exec-mode 'module)
(export sum)
(definesum (lambda (a b) (+ a b)))
(sum 55) ;; Errors! Modules can only have defines, imports and exports
---
(exec-mode 'test)
(test "adds two numbers together" (lambda ()
(assert (sum 55) 10)))
(test "should error is missing arguments" (lambda ()
(assert-throws (sum) "Required 2 arguments but got 0")))
---
(exec-mode 'script)
(definea 10)
(defineb 30)
(display (string-append "When you add " a " and " b " you get " (sum a b)))
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: