Closed rHermes closed 4 years ago
Hi, sorry for taking so long to respond!
There are two issues here. First, you didn't give an argument for map. You probably want to do something like this:
(module
(define (main)
(println (map (lambda (x) (+ 2 x)) (vector 1 2 3 4)))
0))
Next, Harlan doesn't actually support map yet (although I'm testing a change that adds it as I type). To do the same thing without map, you'd do something like this:
(module
(define (main)
(println (kernel ((x (vector 1 2 3 4))) (+ 2 x)))
0))
Let me know if this helps!
When I try to compile this program:
I get this error:
What am I doing wrong here?