Created
February 25, 2024 12:55
-
-
Save jkone27/26b6cbb886af3d4f940bd261466c3eaa to your computer and use it in GitHub Desktop.
F# code sample comparion to ocaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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