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

Glib GIOChannel -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

python - Obscure curses error message when creating a sub window -