Created
May 6, 2013 11:52
-
-
Save lichenbo/5524702 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
list_t * map (void * (*f)(void*, void*), void* env, list_t* xs) { | |
if (xs == NULL) | |
return NULL; | |
return makelist(f(env, xs->head), map(f, env, xs->tail)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment