fork download
  1. let rec formatEqual format argument =
  2. let sFormat = format.ToString()
  3. let sArgument = argument.ToString()
  4.  
  5. match sFormat with
  6. | "" -> string.Equals("")
  7. | s -> match format.Chars(0) with
  8. // | "?"
  9. // | "*"
  10. | c -> sFormat.Chars(0).Equals(sArgument.Chars(0)) && formatEqual format.[1..] string.[1..]
  11.  
  12. let format = System.Console.ReadLine()
  13. let name = System.Console.ReadLine()
  14. let res = formatEqual format name
  15.  
  16. printfn "%b" res
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/home/VHo03F/prog.fs(10,9): warning FS0058: Possible incorrect indentation: this token is offside of context started at position (7:12). Try indenting this token further or using standard formatting conventions.

/home/VHo03F/prog.fs(6,13): error FS0043: The type '( ^a -> string)' does not support the 'equality' constraint because it is a function type

/home/VHo03F/prog.fs(7,18): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.

/home/VHo03F/prog.fs(10,75): error FS0072: Lookup on object of indeterminate type based on information prior to this program point. A type annotation may be needed prior to this program point to constrain the type of the object. This may allow the lookup to be resolved.

/home/VHo03F/prog.fs(10,88): error FS0039: The field, constructor or member 'GetSlice' is not defined
stdout
Standard output is empty