You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I created a higher order function by chaining this type of function together
letanon={| a =""; b =5; c = box 5|}letInspection=let mutableprime=fun(k:{|a:string; b:int; c:obj|})-> anon
letincparam(source :({|a:string; b:int; c:obj|}->{|a:string; b:int; c:obj|}) ref)param =letold_= prime
source.Value <-fun p -> param (old_ p)
incparam (ref prime)(fun p ->{| p with a ="awudaiwud"|})
incparam (ref prime)(fun p ->{| p with b =5|})
prime
is it automatically combining the chainings to one function let Example = fun (k :{|a:string; b:int; c:obj|}) -> {| a = "awudaiwud"; b = 5; c = box 5|}
in other words, can Example be the compiled result of Inspection
I tried compiling in SharpLab but I am not good enough to understand the IL
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
If I created a higher order function by chaining this type of function together
is it automatically combining the chainings to one function
let Example = fun (k :{|a:string; b:int; c:obj|}) -> {| a = "awudaiwud"; b = 5; c = box 5|}
in other words, can Example be the compiled result of Inspection
I tried compiling in SharpLab but I am not good enough to understand the IL
https://sharplab.io/#v2:EYLgxg9gTgpgtADwGwBYA0AbEAzAzmgFxAEsMAfCABxgDsACAZQE9cCYBbAWACgeMYCdAIY0I9ALx0A3mWF1JAIgUBuOsHl0ArKrAbgEBFrIBfHme79BASRq5qYAsTHyedN3Ut12AVwJDg/HSUUMTsMBrY3vQAFADWdCAyQiCsITQA5qqgxDQEOiAQwABWJgCUdHAAfMKiNObuHgJ0OWCUQlBC7HTRuBDeUGDhINFJKQRpmWokufmFJcYV1aOpOZPZM3RgBcVldLDY5W0dXeKuDe6eEBgAJgD6GsGhMGfndL39gwB0AGpCGN7hAA8cDokXolEWQXanW6VzuQVK9XcLSOMOi+yCITC5WiYKCkJk+IA7sQCAALOSKIRE7zXITEGnXBR0MovZo0VrQrromDYTFPHF4iFVaSyCEk8lqDSaFnGRHcBqPMJsvhNACiCE6lECkjxcQSy3Gqyy0zym2283KIsJQg0CmptPpjJUUsk2k2egMRmMQA
Beta Was this translation helpful? Give feedback.
All reactions