dep.scm 378 B

1234567891011121314151617181920
  1. (defclass (foo [list? l1]
  2. [(list-of-length (length l1)) l2]))
  3. (defclass (foo2 [(list-of real?) l1]
  4. [(list-of symbol?) l2])
  5. (defmethod (bla x) ...))
  6. (def. (foo2.bla x) ...)
  7. (def (f) -> foo2?
  8. (foo2 '(1 3 4 5) '(a b c)))
  9. (def (g [foo? f]) -> (list-of real?)
  10. (foo.l1 f))
  11. (first (g (foo2 '(1 2 34) '(a b c)))) -> real? or exception