Skip to content

ex4 4

← Back

Basic Info

Functional Programming
└── Lab ML
    └── 0​228
        └── ex4 4.sml

Preview

(*
Give examples of objects of the following types, without using empty lists

    int list list list

    (int * char) list

    string list * ( int * (real * string) * int )

    ((int * int) * (bool list) * real) * (real * string)

    (bool * int) * char

    real * int list list list list
*)

[[[1,2]],[[3,4]]];

[(1,#"a"), (2,#"b")];

(["ab","cd"], (4,(2.5,"ef")), 7);

(((5,6), [true, false], 5.6), (6.7, "abc"));

((true, 7), #"a");

(7.8, [[[[1,2],[3,4]]]]);