Skip to main content
Improve wording
Source Link
Jwosty
  • 3.6k
  • 2
  • 23
  • 36

Use function instead of match when possible; it'll save 6 characters for 1-character variablesvariable names:

let f=function // ... (14 chars) 

vs

let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

let f=function // ... (14 chars) 

vs

let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 

Use function instead of match when possible; it'll save 6 characters for 1-character variable names:

let f=function // ... (14 chars) 

vs

let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 
Highlighter hints
Source Link
Jwosty
  • 3.6k
  • 2
  • 23
  • 36

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

  
let f=function // ... (14 chars) 

vs

  
let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

  
match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

 
let f=function // ... (14 chars) 

vs

 
let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

 
match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

 
let f=function // ... (14 chars) 

vs

 
let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

 
match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 
Mod Removes Wiki by Doorknob
added 211 characters in body
Source Link
Jwosty
  • 3.6k
  • 2
  • 23
  • 36

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

let f=function // ... (14 chars) 

vs

let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

let f=function // ... (14 chars) 

vs

let f x=match x with // ... (20 chars) 

Use function instead of match when possible; it'll save 6 characters for 1-character variables:

let f=function // ... (14 chars) 

vs

let f x=match x with // ... (20 chars) 

It can also replace any pattern match to consistently save 1 character:

match a with| // ... (13 chars) a|>function| // ... (12 chars) (function| (* ... *))a // (12 chars) 
Source Link
Jwosty
  • 3.6k
  • 2
  • 23
  • 36
Loading