F# রিপ্রেজেন্টার সলুশনে যে নরমালাইজেশনগুলো প্রয়োগ করে তার একটি পরিচিতি
F# রিপ্রেজেন্টার নিচের নরমালাইজেশনগুলো প্রয়োগ করে:
সব কমেন্ট সরিয়ে ফেলা হয়।
module Fake
(* Block comment
on multiple lines *)
let message = "Hi" (* Block comment after code *)
// Double-slash comment on single line
let reply = "Yo" // Double-slash comment after code
/// <summary>This function adds two numbers</summary>
/// <param name="x">The first number</param>
/// <param name="y">The second number</param>
/// <returns>The first number added to the second number</param>
let add x y = x + y
module Fake
let message = "Hi"
let reply = "Yo"
let add x y = x + y
সব ইমপোর্ট ডিক্লারেশন সরিয়ে ফেলা হয়।
module Fake
open System
open System.IO
let message = "Hi"
module Fake
let message = "Hi"
কোডটি fantomas লাইব্রেরি দিয়ে ফরম্যাট করা হয়। এটি F# স্টাইল গাইড অনুযায়ী কোড ফরম্যাট করে। fantomas যে সব রূপান্তর প্রয়োগ করে তার সম্পূর্ণ তালিকা এখানে পাওয়া যাবে।
module Fake
let add ( birthDate : DateTime) =
birthDate.Add ( 2.0)
type Volume =
| Liter of float
| USPint of float
| ImperialPint of float
module Fake
let add (birthDate: DateTime) =
birthDate.Add(2.0)
type Volume =
| Liter of float
| USPint of float
| ImperialPint of float
আইডেন্টিফায়ারগুলো একটি প্লেসহোল্ডার মানে নরমালাইজ করা হয়।
module Fake
let foo x = x + 1
module PLACEHOLDER_1
let PLACEHOLDER_3 PLACEHOLDER_2 = PLACEHOLDER_2 + 1