Reputation: 838
I have a list of functions flist
that receive 1 argument. I am trying to call the first function and pass 1
as an argument to it:
((car flist) 1)
And then I get:
expected: pair? given: #<procedure:hash2>
I also tried:
(((car flist) 1))
But then I get another error:
expected a procedure that can be applied to arguments
What am I doing wrong?
Upvotes: 0
Views: 102
Reputation: 236004
I think your function list wasn't properly built. For example, this works:
(define flist (list sin cos tan))
((car flist) 1)
=> 0.8414709848078965
Upvotes: 1