Skip to main content
Commonmark migration
Source Link

FSharp, ~207 177

#FSharp, ~207 177 CountCount includes whitespace since its significant for f#

let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")

#FSharp, ~207 177 Count includes whitespace since its significant for f#

let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")

FSharp, ~207 177

Count includes whitespace since its significant for f#

let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")
deleted 251 characters in body
Source Link

#FSharp, ~207 177 Count includes whitespace since its significant for f#

 let f(w:string)=
 let r=System.Random()
 let e=w.Length-1
 (List.ofArray(w.ToCharArray())|>List.mapi(fun i l->if i=0||i=e then(i,l) else(r.Next(1,e),l))|>List.sortBy fst|>List.map(fun(a,b)->b)).ToString()
let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")

#FSharp, ~207 177 Count includes whitespace since its significant for f#

 let f(w:string)=
 let r=System.Random()
 let e=w.Length-1
 (List.ofArray(w.ToCharArray())|>List.mapi(fun i l->if i=0||i=e then(i,l) else(r.Next(1,e),l))|>List.sortBy fst|>List.map(fun(a,b)->b)).ToString()
let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")

#FSharp, ~207 177 Count includes whitespace since its significant for f#

let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")
added 242 characters in body
Source Link

#FSharp, ~207~207 177 Count includes whitespace since its significant for f#

 let f(w:string)=
 let r=System.Random()
 let e=w.Length-1
 (List.ofArray(w.ToCharArray())|>List.mapi(fun i l->if i=0||i=e then(i,l) else(r.Next(1,e),l))|>List.sortBy fst|>List.map(fun(a,b)->b)).ToString()
let f(w:string)= w=
 let r=System.Random()
 let e=w.Length-1
e (List= Seq.ofArray(length w.ToCharArray
 ())|>Listw|>Seq.mapi(fun i l->if i=0||i=e-1 then( i,l) else( r.Next(1,e-1),l))|>List|>Seq.sortBy fst|>Listfst|>Seq.map(fun(a,b)->b) snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")

#FSharp, ~207 Count includes whitespace since its significant for f#

let f(w:string)=
 let r=System.Random()
 let e=w.Length-1
 (List.ofArray(w.ToCharArray())|>List.mapi(fun i l->if i=0||i=e then(i,l) else(r.Next(1,e),l))|>List.sortBy fst|>List.map(fun(a,b)->b)).ToString()

Run with:

printfn "%s" (f "apples")

#FSharp, ~207 177 Count includes whitespace since its significant for f#

 let f(w:string)=
 let r=System.Random()
 let e=w.Length-1
 (List.ofArray(w.ToCharArray())|>List.mapi(fun i l->if i=0||i=e then(i,l) else(r.Next(1,e),l))|>List.sortBy fst|>List.map(fun(a,b)->b)).ToString()
let f w=
 let r=System.Random()
 let e = Seq.length w
 (w|>Seq.mapi(fun i l->if i=0||i=e-1 then i,l else r.Next(1,e-1),l)|>Seq.sortBy fst|>Seq.map snd|>List.ofSeq).ToString()

Run with:

printfn "%s" (f "apples")
Source Link
Loading