I am trying to implement map function in VB.NET and I have tried the below.
Function Map(a,f)
Dim i
for each i in a
f(i)
next
End Function
Function alert(a)
MessageBox.Show(a)
end function
But the above code is not working and saying alert is not declared.
Please help me on this.
Your functions don’t return anything. Try this:
Above is based on the methods from the question. An actual traditional
Map()function might look more like this:Or this: