Static signature for higher order function in Bigloo Scheme

105 views Asked by At

Does anyone know how to create a static signature for a higher order function in the module export section in the Bigloo Scheme language?

Here is how far I got

(module test
  (export (adder ::double)))

(define (adder x)
  (lambda (y)
    (set! x (+ x y))
    x))

The following will work, but I want to keep all the type data in the module declaration

(module test
  (export (adder ::double)))

(define (adder x)
  (lambda (y::double)::double
    (set! x (+ x y))
    x))
0

There are 0 answers