Sorry if this has been covered, but I couldn't find anything in my searches, and was hoping someone could shed some light on something for me.
I have an old lisp I am trying to convert over to .Net and my experience with Lambda is killing me right now
.
First off, I was trying to follow JTB World's little example (
http://blog.jtbworld.com/2008/01/lambda-expressions-and-mapcar-with.html), but could not see the way to 'convert' it properly.
I did create the MapCar function as shown, but that is where I am now lost.
Function MapCar(ByVal f As Func(Of Object, Object), ByVal ParamArray x() As Object) As Array
Dim res(UBound(x(0))) As Object
For i As Integer = 0 To UBound(x(0))
res(i) = f(x(0)(i))
Next i
Return res
End Function
Now here is the code from my lisp in short...
(MAPCAR
'(LAMBDA (OBJECTTYPE)
(ENTS-SETVAR (STRCAT OBJECTTYPE".BLKNAME")
)
)
)
(STRINGTOLST
(ENTS-GETVAR "ENTS.OBJECTTYPE")
","
"\""
T
)
)
Now would it be safe to say that to make things simple, I could just do something like:
For Each EntType In Application.GetSystemVariable(ENTS.OBJECTTYPE)
Application.SetSystemVariable(EntType)
Sorry if this is too rudimentary but I am half asleep and scratchin my noggin...