f# list map function
let squares = [2; 4; 6; 8]
|> List.map (fun n -> n * n)
// val squares : int list = [4; 16; 36; 64]
f# list map function
let squares = [2; 4; 6; 8]
|> List.map (fun n -> n * n)
// val squares : int list = [4; 16; 36; 64]
f# list map function
let toUpper = fun c -> System.Char.ToUpper(c)
let allcaps = "sesquipedalian"
|> String.map toUpper
// val allcaps : string = "SESQUIPEDALIAN"
f# list map function
let f = fun n -> n * n
let squares = [2; 4; 6; 8] |> List.map f
// val squares : int list = [4; 16; 36; 64]
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us