File: file.fs

package info (click to toggle)
gtksourceview4 4.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 15,840 kB
  • sloc: ansic: 49,715; sh: 4,917; xml: 1,302; makefile: 1,010; python: 230; perl: 52; yacc: 45; cobol: 20; objc: 19; sed: 16; fortran: 14; cpp: 8; ml: 3
file content (8 lines) | stat: -rw-r--r-- 200 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
(* Simple F# sample *)
let rec map func lst =
    match lst with
       | [] -> []
       | head :: tail -> func head :: map func tail
 
let myList = [1;3;5]
let newList = map (fun x -> x + 1) myList