#!/usr/bin/env auto-editor palet

#lang palet

(assert (equal? (case (+ 7 5) [(1 2 3) 'small] [(10 11 12) 'big]) 'big))
(assert (equal? (case (- 7 5) [(1 2 3) 'small] [(10 11 12) 'big]) 'small))
(assert (case (mod 3 2) [(0) #f] [else #t]))
(assert (case 'y [(y) #t]))


(define/c (read-tb-ntsc [tb int?] [ntsc bool?] -> frac?)
    (if ntsc
        (cond
            ((= tb 24) 24000/1001)
            ((= tb 30) 30000/1001)
            ((= tb 60) 60000/1001)
            (else (* tb 999/1000))
        )
        (* tb 1/1)
    )
)

(assert (equal? (read-tb-ntsc 3 #f) 3/1))
(assert (equal? (read-tb-ntsc 3 #t) 2997/1000))
(assert (equal? (read-tb-ntsc 30 #f) 30/1))
(assert (equal? (read-tb-ntsc 30 #t) 30000/1001))

(assert (not (keyword? 3)))
(assert (not (keyword? #(3 4))))
(assert (not (keyword? 'define)))
(assert (keyword? '#:hello))
(assert (equal? (keyword->string '#:hello) "hello"))
(assert (equal? (string->keyword "hello") '#:hello))
(assert (equal? '(3 4) '(3 4)))
