Skip to content

Instantly share code, notes, and snippets.

@bjartwolf
Last active August 29, 2015 14:20
Show Gist options
  • Save bjartwolf/4d8f802fc2d38bf71077 to your computer and use it in GitHub Desktop.
Save bjartwolf/4d8f802fc2d38bf71077 to your computer and use it in GitHub Desktop.
would be nice if it worked
type foo<'A> = { Name: string; things : 'A list}
let bar = { Name = "Bjorn"; things = [1;2;3;4]}
let baz = {Name = bar.Name; things = bar.things |> List.map (fun x -> x.ToString())}
let baznoworky = { bar with things = (bar.things |> List.map (fun x -> x.ToString()))}
@bjartwolf
Copy link
Author

Have this issue at work, where there are more things to copy and it would be supersweet if the generic list could be just replaced with with to another type...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment