2016-03-04 08:08:47 +03:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
// Forward declaration of Env (see env.h for full interface)
|
|
|
|
@class Env;
|
|
|
|
*/
|
|
|
|
// Forward declaration of EVAL function
|
|
|
|
NSObject *EVAL(id ast, id env);
|
|
|
|
|
2016-03-04 10:56:54 +03:00
|
|
|
@interface MalFunc : NSObject <NSCopying>
|
2016-03-04 08:08:47 +03:00
|
|
|
|
|
|
|
@property (copy) NSArray * ast;
|
|
|
|
@property (copy) Env * env;
|
|
|
|
@property (copy) NSArray * params;
|
2016-03-04 10:56:54 +03:00
|
|
|
@property BOOL isMacro;
|
|
|
|
@property (copy) NSObject * meta;
|
2016-03-04 08:08:47 +03:00
|
|
|
|
|
|
|
- (id)init:(NSArray *)ast env:(Env *)env params:(NSArray *)params;
|
|
|
|
|
|
|
|
- (id)apply:(NSArray *)args;
|
|
|
|
|
|
|
|
@end
|
2016-03-04 10:56:54 +03:00
|
|
|
|
|
|
|
NSObject * apply(id f, NSArray *args);
|