Static signature for higher order function in Bigloo Scheme

吃可爱长大的小学妹 提交于 2019-12-11 09:50:25

问题


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

来源:https://stackoverflow.com/questions/12100256/static-signature-for-higher-order-function-in-bigloo-scheme

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!