From d18403a303c63cd26d113d06cca0e11db6d05ce0 Mon Sep 17 00:00:00 2001 From: John Clements Date: Wed, 9 Dec 2009 00:06:13 +0000 Subject: [PATCH] added simple example of _fun svn: r17245 --- collects/scribblings/foreign/types.scrbl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/collects/scribblings/foreign/types.scrbl b/collects/scribblings/foreign/types.scrbl index c249299881..654c61aea2 100644 --- a/collects/scribblings/foreign/types.scrbl +++ b/collects/scribblings/foreign/types.scrbl @@ -470,6 +470,15 @@ form, only the input @scheme[type-expr]s and the output @scheme[type-expr] are specified, and each types is a simple expression, which creates a straightforward function type. +For instance, + +@schemeblock[ +(_fun _int _string -> _int) +] + +specifies a function that receives an integer and a +string, and returns an integer. + In its full form, the @scheme[_fun] syntax provides an IDL-like language that can be used to create a wrapper function around the primitive foreign function. These wrappers can implement complex