Skip to main content
Commonmark migration
Source Link

FSharp 275 bytes#bytes

let f (p : string, q : string) = let l = if p.Length < q.Length then p.Length else q.Length p.Substring(0,l).ToCharArray() |> Array.mapi (fun i x -> (((int(x) - 32) * (int(q.[i]) - 32)) % 95) + 32) |> Array.map (fun x -> char(x).ToString()) |> Array.fold(+) "" 

FSharp 275 bytes#

let f (p : string, q : string) = let l = if p.Length < q.Length then p.Length else q.Length p.Substring(0,l).ToCharArray() |> Array.mapi (fun i x -> (((int(x) - 32) * (int(q.[i]) - 32)) % 95) + 32) |> Array.map (fun x -> char(x).ToString()) |> Array.fold(+) "" 

FSharp 275 bytes

let f (p : string, q : string) = let l = if p.Length < q.Length then p.Length else q.Length p.Substring(0,l).ToCharArray() |> Array.mapi (fun i x -> (((int(x) - 32) * (int(q.[i]) - 32)) % 95) + 32) |> Array.map (fun x -> char(x).ToString()) |> Array.fold(+) "" 
Source Link
Laco
  • 31
  • 1

FSharp 275 bytes#

let f (p : string, q : string) = let l = if p.Length < q.Length then p.Length else q.Length p.Substring(0,l).ToCharArray() |> Array.mapi (fun i x -> (((int(x) - 32) * (int(q.[i]) - 32)) % 95) + 32) |> Array.map (fun x -> char(x).ToString()) |> Array.fold(+) ""