Created
March 28, 2015 11:17
-
-
Save vibhavp/2bd8afcac70fad018cd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static object_t *call_predicate(object_t *obj, predicate_t pred) | |
{ | |
switch(pred) | |
{ | |
case INTEGER_P: | |
return PRED_BOOL_OBJ(_INTEGER_P(obj)); | |
case FLOAT_P: | |
return PRED_BOOL_OBJ(_FLOAT_P(obj)); | |
case NUMBER_P: | |
return PRED_BOOL_OBJ(_NUMBER_P(obj)); | |
case STRING_P: | |
return PRED_BOOL_OBJ(_STRING_P(obj)); | |
case SYMBOL_P: | |
return PRED_BOOL_OBJ(_SYMBOL_P(obj)); | |
case LIST_P: | |
return PRED_BOOL_OBJ(_LIST_P(obj)); | |
case LAMBDA_P: | |
return PRED_BOOL_OBJ(_LAMBDA_P(obj)); | |
} | |
/*The control will never reach here*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment