f# - Passing large sequences as function parameters -


this simple question (but couldn't seem find answer in msdn documents).

if pass large sequences , objects function parameters in f#, copied value unless supply byref keyword? thing is, have no intention of modifying arguments, @ same time, don't want large objects copied each time call function.

by default sequences/lists/arrays passed reference

for example

let mutate (arr:int[]) =     arr.[0] <- 1  let t = array.zerocreate 1 mutate t printfn "%i" (t.[0]) //prints 1 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -