Created
June 7, 2012 00:54
-
-
Save desg/2885799 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
#include <stdio.h> | |
#include <stdlib.h> | |
struct list { | |
int val; | |
struct list *next; | |
}; | |
list *map(list *list, int (*fn)(int)) | |
{ | |
typedef struct list list; | |
list *first = new list; | |
first->next = list; | |
first->val = val; | |
return first; | |
} | |
int main() | |
{ | |
fn = □ | |
} | |
int square(int n) { | |
return n * n; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment