Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only destructure once consider capture symbol when capturePositionals ? #24

Open
lust4life opened this issue Nov 3, 2017 · 0 comments

Comments

@lust4life
Copy link

lust4life commented Nov 3, 2017

type User = 
  {
    id      : int 
    name    : string
    created : DateTime
  }
with
  interface IFormattable with
    member x.ToString (format, provider) =
      sprintf "id => %i, name => %s, created => %A" x.id x.name (x.created.ToShortDateString())

let foo = { id = 999; name = "foo"; created = DateTime.Now}
let nl = Environment.NewLine + Environment.NewLine

Formatting.format (Parser.parse "{0} {1} {$0} {1} {@0}") [| foo; nl |] 

output:

> Formatting.format (Parser.parse "{0} {1} {$0} {1} {@0}") [| foo; nl |]

val it : string =
  ""{id = 999;
 name = \"foo\";
 created = 11/3/2017 7:54:35 PM;}" "

" "{id = 999;
 name = \"foo\";
 created = 11/3/2017 7:54:35 PM;}" "

" "{id = 999;
 name = \"foo\";
 created = 11/3/2017 7:54:35 PM;}""

hi, do we support template like this ? "{0} {1} {$0} {1} {@0}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant