default.txt 870 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. open System
  2. // Single line comment...
  3. (*
  4. This is a
  5. multiline comment.
  6. *)
  7. let checkList alist =
  8. match alist with
  9. | [] -> 0
  10. | [a] -> 1
  11. | [a; b] -> 2
  12. | [a; b; c] -> 3
  13. | _ -> failwith "List is too big!"
  14. let text = "Some text..."
  15. let text2 = @"A ""verbatim"" string..."
  16. let catalog = """
  17. Some "long" string...
  18. """
  19. let rec fib x = if x <= 2 then 1 else fib(x-1) + fib(x-2)
  20. let fibs =
  21. Async.Parallel [ for i in 0..40 -> async { return fib(i) } ]
  22. |> Async.RunSynchronously
  23. type Sprocket(gears) =
  24. member this.Gears : int = gears
  25. [<AbstractClass>]
  26. type Animal =
  27. abstract Speak : unit -> unit
  28. type Widget =
  29. | RedWidget
  30. | GreenWidget
  31. type Point = {X: float; Y: float;}
  32. [<Measure>]
  33. type s
  34. let minutte = 60<s>
  35. type DefaultMailbox<'a>() =
  36. let mutable inbox = ConcurrentQueue<'a>()
  37. let awaitMsg = new AutoResetEvent(false)