Suppose I have :
datatype env =
| empty_env of ()
| extend_env of (string,int,env)
What is its equivalent in C . I tried to follow the example in “Interaction
with C” , but cannot seem to make it work.
In C suppose I have two function : make_empty_env , and make_extend_env ,
what should be there signatures?
-
return_type??? make_empty_env () { … }
-
return_type??? make_extend_env (char * s , int , ???) {…}
Thanks
gmhwxi
2
extern void *make_empty_env () ;
extern void *make_extend_env (char arg0, int arg1, void arg2) ;On Friday, March 21, 2014 7:21:09 AM UTC-4, chotu s wrote:
Suppose I have :
datatype env =
| empty_env of ()
| extend_env of (string,int,env)
What is its equivalent in C . I tried to follow the example in
“Interaction with C” , but cannot seem to make it work.
In C suppose I have two function : make_empty_env , and make_extend_env ,
what should be there signatures?
-
return_type??? make_empty_env () { … }
-
return_type??? make_extend_env (char * s , int , ???) {…}
Thanks