KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to call xyz with the name of a function to be invoked. -module(sample). -export([xyz/1]). xyz(Name) -> Name(). p() -> "you called p". g() -> "you called g". But I get the following error: 1> c(sample.erl). ./sample.erl:6: Warning: function p/0 is unused ./sample.erl:7: Warning: function g/0 is unused {ok,sample} 2> sample:xyz('p'). ** exception error: bad function p in function sample:xyz/1 3>
Tags (comma-separated)
Save Edits
Cancel