UNB/ CS/ David Bremner/ teaching/ cs4613/ lectures/ lecture13/ plus.rkt
#lang typed/racket
(require [rename-in typed/rackunit [check-equal? test]])

(define (plus l r)
  (cond
    [(and (number? l) (number? r)) (+ l r)]
    [(and (string? l) (string? r)) (string-append l r)]
    [else (error 'plus "mismatch")]))
(test (plus 6 7) 13)
(test (plus "hello" " world") "hello world")