re: Write a function that shows off something unique or interesting about the language you're using VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

In F# it is also easy to add functionality to existing classes.

type String with

    member me.yell () =
        me.ToUpper() + "!!!"

You can also add functions to existing static classes (modules) too.

module Array =
    let shuffle arr =
        ...

[| for i in 0 .. 23 do yield i * i |]
    |> Array.filter isOdd   // filter is built-in
    |> Array.shuffle        // i added
code of conduct - report abuse