Skip to content

Instantly share code, notes, and snippets.

@jkone27
Created February 25, 2024 12:55
Show Gist options
  • Save jkone27/26b6cbb886af3d4f940bd261466c3eaa to your computer and use it in GitHub Desktop.
Save jkone27/26b6cbb886af3d4f940bd261466c3eaa to your computer and use it in GitHub Desktop.
F# code sample comparion to ocaml
open System
module Test =
let hello world =
"hello " + world
let lst =
[
"world"
"john"
"BUG"
"mary"
]
|> Seq.filter (fun x -> x <> "BUG")
|> Seq.map Test.hello
|> Seq.toList
lst |> Seq.iter (printfn "%s")
lst
|> Seq.reduce (fun x y -> x + "," + y)
|> printfn "%s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment