[racket-dev] signatures?

From: Danny Yoo (dyoo at cs.wpi.edu)
Date: Fri Sep 2 12:31:38 EDT 2011

I tried the following program in ASL.  In Definitions:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(: g (Number -> Number))
(define g
  (lambda (x)
    (if (= x 0)
        x
        (list "three" x))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

I ran Definitions, and then in my Interactions window, entered:

   > (g 20)

I got back a result that was not a number, but I did not see an
expected signature error.  Should I?  I tried this in Die Macht der
Abstraktion, with identical results.


Posted on the dev mailing list.