MyWackoSite: ocaml

https://wiki.ebal.gr     Version: 1 (09/20/2013 22:49)

ocaml


Hits : 2,780


ocaml.org[link1]


some notes on ocaml[link2]

facts:


Documentation and userΆs manual[link3]



ONE

HTML
ebal@mylaptop ~$ ocaml
        OCaml version 4.00.1

# 1+2*3;;
- : int = 7

# 1;;
- : int = 1
# 1.1;;
- : float = 1.1
# 'a';;
- : char = 'a'
# "a";;
- : string = "a"
# abc;;
Error: Unbound value abc
# "abc";;
- : string = "abc"

# true;;
- : bool = true
# false;;
- : bool = false

# (1<2);;
- : bool = true
# (1>2);;
- : bool = false

# ["hello", "world"];;
- : (string * string) list = [("hello", "world")]

# ["hello"; "world"];;
- : string list = ["hello"; "world"]

# "a" :: ["hello"; "world"];;
- : string list = ["a"; "hello"; "world"]



Two