[erlang-questions] Second order function lists:map
Tue Mar 10 15:56:23 CET 2009
I am trying to write two small functions employing the lists package,
and now I am wondering how to proceed. My functions are quite
straightforward: I want two second-order functions that "abstract"
The first one is a function that applies a given function to a list of
arguments. So, a first application gives me a function, and this
applied to a list gives me the mapping of my function over the list. I
have succeeded in doing this function and it seems to work:
41> PP=p:paa(fun math:sin/1).
The second one is tricky to me (I am not an erlang guru!). I want its
"dual", so given a list of functions, I'd like to map them to a single
argument, writing a second-order function like the above p:paa/1. The
only problem is that I am stopped by this problem, I know it's easy
but I am not that good at functional programming :)
Thanks for any help!
Franco Milicchio <franco.milicchio@REDACTED>
DIA - Dept. of Computer Science and Engineering
University Roma Tre
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2435 bytes
Desc: not available
More information about the erlang-questions