3 ms·
This is awesome! > First, F# doesn’t support function pointers As an experiment, can you work around this with the (deprecated) inline CIL operator: (# ... #)
by david_allison 5y ago
This is awesome!
> First, F# doesn’t support function pointers
As an experiment, can you work around this with the (deprecated) inline CIL operator: (# ... #)
https://stackoverflow.com/questions/15968054/what-is-the-syntax-seen-in-f-standard-library-implementation https://stackoverflow.com/questions/15968054/what-is-the-syn...
- piaste 5y agoUnfortunately that syntax is a little troublesome to use. To enable it, you need to add the --compiling-fslib flag, which basically declares "hi i want to build a stdlib, I know what I'm doing (the flag is undocumented btw)" and as a result it doesn't include the FSharp.Core library and all the built-in modules. So your code fails to compile because it doesn't know 'string' or 'printf', AFAIK manually adding the reference isn't enough, you would need to statically include all the FSharp.Core source code.