Static signature for higher order function in Bigl

2019-08-04 04:04发布

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))

标签: scheme bigloo
0条回答
登录 后发表回答