summaryrefslogtreecommitdiff
path: root/rushs/evalexpr/functional_programming/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/evalexpr/functional_programming/map.c')
-rw-r--r--rushs/evalexpr/functional_programming/map.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/rushs/evalexpr/functional_programming/map.c b/rushs/evalexpr/functional_programming/map.c
new file mode 100644
index 0000000..311c39c
--- /dev/null
+++ b/rushs/evalexpr/functional_programming/map.c
@@ -0,0 +1,9 @@
+#include "functional_programming.h"
+
+void map(int *array, size_t len, void (*func)(int *))
+{
+ for (size_t i = 0; i < len; i++)
+ {
+ (*func)(array + i);
+ }
+}